macro that displays function from 2 columns
If you have text values try
Sub Macro()
Dim lngRow As Long
For lngRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row
If Range("A" & lngRow) = "False" And Range("b" & lngRow) = "False" Then _
Rows(lngRow).Hidden = True
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"Jacob Skaria" wrote:
Try the below macro...
Sub Macro()
Dim lngRow As Long
For lngRow = 1 To Cells(Rows.Count, "A").End(xlUp).Row
If Range("A" & lngRow) + Range("b" & lngRow) = 0 Then _
Rows(lngRow).Hidden = True
Next
End Sub
If this post helps click Yes
---------------
Jacob Skaria
"FA" wrote:
I have 2 columns in my spreadsheet that contain either True or False entries.
I'm looking to create a macro that will display the True entries from either
column.
If my sheet looks like this,
A B
1 True False
2 True False
3 False False
4 False True
5 False True
Then I want the macro to display only rows 1,2,4 & 5. The colums are never
both True so I don't have to worry about that.
I'm stuck with coming up with a function that will work, any help would be
appreciated!
|