Delete left cell based on right cell value

mpfx

Board Regular
Joined
Jul 25, 2002
Messages
112
Hi all,

I need a macro to delete the values in L3 if the cell value in M3 = 0

I need to do this from L3 to L80 using corresponding cells in col M3 to L80

Thanks for any help.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try

Code:
Sub test()
Dim i As Long
For i = 3 To 80
    If Range("M" & i).Value = 0 Then Range("L" & i).ClearContents
Next i
End Sub
 
Upvote 0

Forum statistics

Threads
1,225,726
Messages
6,186,675
Members
453,368
Latest member
xxtanka

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top