Sub ClearAboveDollarSign()
Dim DollarSign As Range
Set DollarSign = Range("A1:J20").Find("$", Range("J20"), xlValues, xlPart, xlByRows, xlNext)
If Not DollarSign Is Nothing Then
If DollarSign.Row > 1 Then Rows("1:" & DollarSign.Row - 1).ClearContents
End If
End Sub
In that case, change the ClearContents to Delete...brilliant, its awsum thanks alot, but i also want to offset this data to the first row, move the data starting from $ sign to the first row of the sheet
Sub ClearAboveDollarSign()
Dim DollarSign As Range
Set DollarSign = Range("A1:J20").Find("$", Range("J20"), xlValues, xlPart, xlByRows, xlNext)
If Not DollarSign Is Nothing Then
If DollarSign.Row > 1 Then Rows("1:" & DollarSign.Row - 1).Delete
End If
End Sub
Sub ClearAboveDollarSign()
Dim DollarSign As Range, Cell As Range, FirstAddress As String
Set DollarSign = Range("A1:J20").Find("$", Range("J20"), xlValues, xlPart, xlByRows, xlNext)
If Not DollarSign Is Nothing Then
If DollarSign.Row > 1 Then Rows("1:" & DollarSign.Row - 1).Delete
End If
With Columns("A:I")
Set Cell = .Find("$", Range("I" & Rows.Count), xlValues, xlPart, xlByRows, xlNext)
If Not Cell Is Nothing Then
Do
Cell.EntireColumn.Delete
Set Cell = .Find("$", Range("I" & Rows.Count), xlValues, xlPart, xlByRows, xlNext)
Loop While Not Cell Is Nothing
End If
End With
End Sub
Sub ClearAboveDollarSign()
Dim DollarSign As Range, Cell As Range, FirstAddress As String
Set DollarSign = Range("A1:J20").Find("$", Range("J20"), xlValues, xlPart, xlByRows, xlNext)
If Not DollarSign Is Nothing Then
If DollarSign.Row > 1 Then Rows("1:" & DollarSign.Row - 1).Delete
End If
With Columns("A:I")
Set Cell = .Find("$", Range("I" & Rows.Count), xlValues, xlPart, xlByRows, xlNext)
If Not Cell Is Nothing Then
Do
Cell.Value = "#N/A"
Set Cell = .Find("$", Range("I" & Rows.Count), xlValues, xlPart, xlByRows, xlNext)
Loop While Not Cell Is Nothing
End If
.SpecialCells(xlCellTypeConstants, xlErrors).EntireColumn.Delete
End With
End Sub
I just did.Thanks, its working, plz reply to my other code, i desparately need the solution of that