yavshalumov
New Member
- Joined
- Aug 28, 2008
- Messages
- 6
Currently I have a macro that goes line by line and determines if a specific cells's content needs to be hidden based on if certain cells in the spreadsheet are null. The macro works well but I would to see if the reverse could be checked in real-time. For instance, at the moment cell "I10" is hidden if columns B through D are null, but if for instance I fill in columns B through D and they are no longer null, is there a way for cell "I10" to no longer be hidden and display the content it holds in-real time.
my code to hide the cell is as follows:
If (IsEmpty(ActiveSheet.Range("B" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("C" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("D" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("E" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("F" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("G" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("H" & RowValuePM).Value) = True) Then
Range("I" & RowValuePM).Select
Selection.NumberFormat = ";;;"
This is inside a loop with RowValue being the current row in the loop.
The contents of "Ix" is formula that adds two dates together.
Is there perhaps a better way to go about this then writing a macro?
thanks,
my code to hide the cell is as follows:
If (IsEmpty(ActiveSheet.Range("B" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("C" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("D" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("E" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("F" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("G" & RowValuePM).Value) = True Or IsEmpty(ActiveSheet.Range("H" & RowValuePM).Value) = True) Then
Range("I" & RowValuePM).Select
Selection.NumberFormat = ";;;"
This is inside a loop with RowValue being the current row in the loop.
The contents of "Ix" is formula that adds two dates together.
Is there perhaps a better way to go about this then writing a macro?
thanks,