Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Work around to SpecialCells(xlCellTypeBlanks)... DanF Excel Discussion (Misc queries) 7 June 29th 08 07:36 AM
Specialcells Bruno Uato Charts and Charting in Excel 0 October 7th 05 07:42 PM
VBA ON ERROR does not work with SPECIALCELLS Felix Excel Discussion (Misc queries) 2 April 14th 05 10:43 PM
specialcells(xlcelltypeblanks) Neil[_11_] Excel Programming 5 October 9th 03 10:11 AM
.SpecialCells(xlLastCell).Select jim c. Excel Programming 3 October 3rd 03 04:02 PM


All times are GMT +1. The time now is 11:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"