Hello,
I need some help on a macro I am attempting to create. I am completely new to VBA so am struggling a bit with the proper macro to make my desired outcome work. I created a formula in Excel which adds 0s to cells when a condition is met. Ultimately, I need that cell clear of the 0 in order to upload to a website or else an error will occur.
The macro shown below removes the 0 but only in the cell selection. I want the macro to run subsequently in cells down 3 columns, AN, AO, and AP. Any help is much appreciated! Thank you.
Sub DelZeros()
Dim c As Range
For Each c In Selection
If c.Value = 0 Then c.ClearContents
Next c
End Sub
I need some help on a macro I am attempting to create. I am completely new to VBA so am struggling a bit with the proper macro to make my desired outcome work. I created a formula in Excel which adds 0s to cells when a condition is met. Ultimately, I need that cell clear of the 0 in order to upload to a website or else an error will occur.
The macro shown below removes the 0 but only in the cell selection. I want the macro to run subsequently in cells down 3 columns, AN, AO, and AP. Any help is much appreciated! Thank you.
Sub DelZeros()
Dim c As Range
For Each c In Selection
If c.Value = 0 Then c.ClearContents
Next c
End Sub