Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
SpecialCells Doesn't Work in a Function??
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.Sp ecialCells(xlcelltypeVisib le), "YES", SumRng.SpecialCells(xlcelltypeVisible)) test =Application.WorksheetFunction.SumIf( _ ChkRng.SpecialCells(xlCellTypeVisible), _ "YES", _ SumRng.SpecialCells(xlCellTypeVisible)) |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
SpecialCells Doesn't Work in a Function??
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. -- Regards, Tom Ogilvy "Alex J" wrote in message . .. 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.Sp ecialCells(xlcelltypeVisib le), "YES", SumRng.SpecialCells(xlcelltypeVisible)) test =Application.WorksheetFunction.SumIf( _ ChkRng.SpecialCells(xlCellTypeVisible), _ "YES", _ SumRng.SpecialCells(xlCellTypeVisible)) |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
SpecialCells Doesn't Work in a Function??
Thanks for your reply, Tom. I thought I was seeing things for a while!
Alex J "Tom Ogilvy" wrote in message ... 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. -- Regards, Tom Ogilvy "Alex J" wrote in message . .. 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.Sp ecialCells(xlcelltypeVisib le), "YES", SumRng.SpecialCells(xlcelltypeVisible)) test =Application.WorksheetFunction.SumIf( _ ChkRng.SpecialCells(xlCellTypeVisible), _ "YES", _ SumRng.SpecialCells(xlCellTypeVisible)) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Work around to SpecialCells(xlCellTypeBlanks)... | Excel Discussion (Misc queries) | |||
Specialcells | Charts and Charting in Excel | |||
VBA ON ERROR does not work with SPECIALCELLS | Excel Discussion (Misc queries) | |||
specialcells(xlcelltypeblanks) | Excel Programming | |||
.SpecialCells(xlLastCell).Select | Excel Programming |