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.
 
Thanks for your reply, Tom. I thought I was seeing things for a while!

Alex J
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top