I have searched the internet endlessly and have failed to find a solution that works. For starters I don't have much knowledge of visual basic at all, but I'd pick the idea up fairly quickly.
Anyway my problem is this...I'm working on a spreadsheet for a college project and I have created a macro which displays or hides certain rows on a worksheet depending on their content. However, the content of these cells (in the range H22:H102) are also determined by the content of a cell on another worksheet. So basically, what I want is for this macro to be executed everytime a piece of information is entered into the range of cells on the first worksheet ( in my case G24:G104). The macro I have for hiding the rows is as follows:
Sub HideRows2()
Dim cell As Range
For Each cell In Range("H22:H102")
If UCase(cell.Value) = "OK" Then
cell.EntireRow.Hidden = True
Else: cell.EntireRow.Hidden = False
End If
Next
End Sub
I hope I have made myself understood and any help is very much appreciated.
Mike
Anyway my problem is this...I'm working on a spreadsheet for a college project and I have created a macro which displays or hides certain rows on a worksheet depending on their content. However, the content of these cells (in the range H22:H102) are also determined by the content of a cell on another worksheet. So basically, what I want is for this macro to be executed everytime a piece of information is entered into the range of cells on the first worksheet ( in my case G24:G104). The macro I have for hiding the rows is as follows:
Sub HideRows2()
Dim cell As Range
For Each cell In Range("H22:H102")
If UCase(cell.Value) = "OK" Then
cell.EntireRow.Hidden = True
Else: cell.EntireRow.Hidden = False
End If
Next
End Sub
I hope I have made myself understood and any help is very much appreciated.
Mike