I am looking for something if I have formula 7cells from A1 to G1 pulling info over. If one of the cell do not pull info over an it delete the row or line. like if info does not show up in cells D1,E1 and F1
Help please
Help please
Option Explicit
Sub DoIfNotEmpty()
Dim ra As Range, re As Range
With ThisWorkbook.Worksheets("Sheet1")
Set ra = .Range("B2:B10")
For Each re In ra
If IsEmpty(re.Value) Or re.Value = vbNullString Then
Columns("B").EntireColumn.Hidden = True
End If
Next re
End With
End Sub
Sub DoIfNotEmpty()
Dim ra As Range, re As Range
With ThisWorkbook.Worksheets("Sheet1")
Set ra = .Range("U2:W10")
For Each re In ra
If IsEmpty(re.Value) Or re.Value = vbNullString Then
Rows("U", "V", "W").EntireColumn.Hidden = True
End If
Next re
End With
End Sub
Option Explicit
Sub DoIfNotEmpty()
Dim ra As Range, re As Range
With ThisWorkbook.Worksheets("Sheet1")
Set ra = .Range("U2:W10")
For Each re In ra
If IsEmpty(re.Value) Or re.Value = vbNullString Then
Columns("U:W").EntireColumn.Hidden = True
End If
Next re
End With
End Sub