Declamatory
Active Member
- Joined
- Nov 6, 2014
- Messages
- 319
Good afternoon,
I have a workbook that has 7 sheets. The first three sheets named Order, Order Allocation and Order Allocation Charge. There is data in these three sheets that use formulas to look at data in the last four sheets to create orders that are to imported to our operating system. The import fails if a formula returns a blank value e.g. there are 10 orders but row 11 is blank (but contains formulas).
We would not have more than 200 orders in a day.
Is there a way of using vba to clear the contents of cells A1:R200 where the value is blank?
I found this on the web and it does work but only does one column.
Sub ClearCell()
Dim Rng As Range
Set Rng = ActiveSheet.Range("A1")
Dim i As Long
For i = 1 To 200
If Rng.Cells(i, 1) = "" Then
Rng.Cells(i, 1).ClearContents
End If
Next i
End Sub
I have a workbook that has 7 sheets. The first three sheets named Order, Order Allocation and Order Allocation Charge. There is data in these three sheets that use formulas to look at data in the last four sheets to create orders that are to imported to our operating system. The import fails if a formula returns a blank value e.g. there are 10 orders but row 11 is blank (but contains formulas).
We would not have more than 200 orders in a day.
Is there a way of using vba to clear the contents of cells A1:R200 where the value is blank?
I found this on the web and it does work but only does one column.
Sub ClearCell()
Dim Rng As Range
Set Rng = ActiveSheet.Range("A1")
Dim i As Long
For i = 1 To 200
If Rng.Cells(i, 1) = "" Then
Rng.Cells(i, 1).ClearContents
End If
Next i
End Sub