VBA - for each clear cell

jakobt

Active Member
Joined
May 31, 2010
Messages
306
Get a debug in the clear property


Sub RCInclude2()
Dim Cl As Range


For Each Cl In Range("J2", Range("J" & Rows.Count).End(xlUp))
If InStr(1, Cl.Value, "Include", 1) > 0 Then


Cl.Offset(, -2).Value.Clear

end if
end sub
 

Some videos you may like

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,184
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Try:
Cl.Offset(, -2).Clear
 

Watch MrExcel Video

Forum statistics

Threads
1,108,449
Messages
5,523,060
Members
409,495
Latest member
bkahn

This Week's Hot Topics

Top