Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to evaluate if row is hidden?
hi -
I'd like to build a UDF to evaluate (true/false) whether a cell is in a hidden row ... I'll then use this UDF in a conditional format statement to change the font color of a cell. As example, I'll have a string in A20 (eg October) ... default font color is white (aka invisible). However, if cell A19 is hidden (using outline), then font color of A20 should be black. I know how to do the conditional format ... but building the UDF is throwing me off, as I've never built my own. I would image the final output would be: =IsHidden(A19) Can anyone help out with this? TIA, Ray |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to evaluate if row is hidden?
Public Function IsHidden(r As Range) As Boolean
Application.Volatile IsHidden = r.EntireRow.Hidden End Function -- Gary''s Student - gsnu2007d "Ray" wrote: hi - I'd like to build a UDF to evaluate (true/false) whether a cell is in a hidden row ... I'll then use this UDF in a conditional format statement to change the font color of a cell. As example, I'll have a string in A20 (eg October) ... default font color is white (aka invisible). However, if cell A19 is hidden (using outline), then font color of A20 should be black. I know how to do the conditional format ... but building the UDF is throwing me off, as I've never built my own. I would image the final output would be: =IsHidden(A19) Can anyone help out with this? TIA, Ray |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to evaluate if row is hidden?
Perfect, Gary ... UDF and conditional formatting worked exactly as I'd
hoped! one question: what does 'Application.Volatile' mean? why is it necessary? thanks, ray |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
UDF to evaluate if row is hidden?
The statement help to insure the function will be called. Sometimes Excel
thinks its really smart and avoids calling a function if it thinks the argument has not changed. -- Gary''s Student - gsnu2007d "Ray" wrote: Perfect, Gary ... UDF and conditional formatting worked exactly as I'd hoped! one question: what does 'Application.Volatile' mean? why is it necessary? thanks, ray |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
2007 Worksheet, Hidden Columns, .CSV Format Saves Hidden Column Da | Excel Discussion (Misc queries) | |||
Copy and Paste with hidden columns remaining hidden | Excel Discussion (Misc queries) | |||
Rows hidden by Autofilter vs hidden by changing the Hidden property | Excel Programming | |||
Hidden Columns No Longer Hidden after Copying Worksheet? | Excel Discussion (Misc queries) | |||
Saving hidden data with a worksheet (preferably without using a hidden sheet) | Excel Programming |