SpecialCells Doesn't Work in a Function??

  • Thread starter Thread starter Alex J
  • Start date Start date
A

Alex J

All,

I have written a Function to calculate a SUMIF function on a filtered range,
and want to use Range.SpecialCells(xlCellTypeVisible). It won't work.

When I take the identical statements and set up a subroutine, it works?

Any thoughts??

Test=Application.WorksheetFunction.SumIF(ChkRng.SpecialCells(xlcelltypeVisib
le), "YES", SumRng.SpecialCells(xlcelltypeVisible))

test =Application.WorksheetFunction.SumIf( _
ChkRng.SpecialCells(xlCellTypeVisible), _
"YES", _
SumRng.SpecialCells(xlCellTypeVisible))
 
Just confirm that what you say is true. There are several
methods/properties that don't seem to work in a UDF used in a worksheet.
 
Back
Top