Good afternoon experts!
I am struggling with a couple codes. For "SFDC Data" I want to find the first blank in column A (last data set plus 1) and then clear contents from there through I2000. For "CP Raw Data" I want to find the first blank in column B and then clear contents from there through JB2000. I don't know how to set limits correctly. Your assistance would be GREATLY appreciated. I have the below so far:
With Sheets("SFDC Data")
last_row = .Range("A" & .Rows.Count).End(xlUp).Row
End With
For i = last_row To 1 Step -1
If Cells(i, "A").Text <> "" Then
Exit For
End If
Next i
last_row = i
With Sheets("SFDC Data")
.Range("A" & i + 1, .Cells(.Rows.Count, .Columns.Count)).ClearContents
End With
With Sheets("CP Raw Data")
last_row = .Range("B" & .Rows.Count).End(xlUp).Row
End With
For i = last_row To 1 Step -1
If Cells(i, "B").Text <> "" Then
Exit For
End If
Next i
last_row = i
With Sheets("CP Raw Data")
.Range("B" & i + 1, .Cells(.Rows.Count, .Columns.Count)).ClearContents
Bookmarks