Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
xlCellTypeVisible - not working?
specialcells doesn't work if it's called from a function in a cell on a
worksheet. whitehurst wrote: Can somebody please explain where my misunderstanding of SpecialCells(xlCellTypeVisible) is? Example, a completely new workbook: 1. Name range "A1:E10" as "test". 2. Insert the following macros: Public Function total(rng As Range) total = rng.Cells.Count End Function Public Function shown(rng As Range) shown = rng.SpecialCells(xlCellTypeVisible).Cells.Count End Function 3. Insert '=total(test)' and '=shown(test)' into 2 cells not in the range. 4. Both should say 50. Now, start hiding rows/columns intersecting the 'test' range. Even when using Ctrl-Alt-F9, the shown count always equals 50 - why?! Hide all the cells in the range - still 50?! Why? Does SpecialCells(xlCellTypeVisible) not do what I think it should? Thanks! -- whitehurst ------------------------------------------------------------------------ whitehurst's Profile: http://www.excelforum.com/member.php...o&userid=34544 View this thread: http://www.excelforum.com/showthread...hreadid=550123 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculate working days but change working week | Excel Discussion (Misc queries) | |||
Making weekend days working days - the system cuts the working tim | Excel Discussion (Misc queries) | |||
activecell.specialcells(xlCellTypeVisible) returns column refe | Excel Programming | |||
Worksheet function & SpecialCells(xlCellTypeVisible)? | Excel Programming | |||
Adding sales from a non working day to the previous working day | Excel Programming |