Fishboy
Well-known Member
- Joined
- Feb 13, 2015
- Messages
- 4,267
Hi all,
I am trying to avoid writing hundreds of specific lines of code and am looking for an efficient solution if possible.
In my Excel 2010 I have range C48:C167 that are all populated with IF formulas which will either return a value if one exists or return "" if not. I need a macro which checks the values in the range and, if all values are "", then row 47 needs to be hidden. If there is so much as a single cell in the range with a value other than "", row 47 needs to be unhidden.
So far I cannot seem to find the right syntax to get this working, short of having something ridiculous like
from 48 to 167.
Can anyone offer any suggestions please?
I am trying to avoid writing hundreds of specific lines of code and am looking for an efficient solution if possible.
In my Excel 2010 I have range C48:C167 that are all populated with IF formulas which will either return a value if one exists or return "" if not. I need a macro which checks the values in the range and, if all values are "", then row 47 needs to be hidden. If there is so much as a single cell in the range with a value other than "", row 47 needs to be unhidden.
So far I cannot seem to find the right syntax to get this working, short of having something ridiculous like
Rich (BB code):
If Worksheets("Generator").Range("C48").Value = "" And Range("C49").Value = ""......and so on
Can anyone offer any suggestions please?