Re: $$Excel-Macros$$ Clear row contents based on criteria

2013-09-20 Thread priti verma
Hi, Replace these line If Range(l2:l r).Value = Rolled-Over Then Range(A cell :Q cell).ClearContents with If cell.Value = Rolled-Over Then cell.EntireRow.ClearContents On Fri, Sep 20, 2013 at 7:20 AM, Hilary Lomotey resp...@gmail.com wrote: Hello Champs, i have written

Re: $$Excel-Macros$$ Clear row contents based on criteria

2013-09-20 Thread Hilary Lomotey
thanks priti for the response, the first line of code is ok but i dont want to delete entire because i may have other information on that row in another column, how can i manage that? is it possible? thanks On Fri, Sep 20, 2013 at 2:36 PM, priti verma pritiverma1...@gmail.comwrote: Hi,

Re: $$Excel-Macros$$ Clear row contents based on criteria

2013-09-20 Thread priti verma
Try this Sub ROOTY() Dim r As Long Dim lngcolumn As Long r = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row lngcolumn = Sheet1.UsedRange.Rows(1).Find(USER NAME ).Column For Each cell In Range(l2:l r) If cell.Value = Rolled-Over Then Sheet1.Cells(cell.Row, 1).Resize(, lngcolumn).Select

Re: $$Excel-Macros$$ Clear row contents based on criteria

2013-09-20 Thread Hilary Lomotey
one word, S U P E R B nicely done. thanks can u explain this line Find(USER NAME ).Column pls thanks On Fri, Sep 20, 2013 at 2:49 PM, priti verma pritiverma1...@gmail.comwrote: Try this Sub ROOTY() Dim r As Long Dim lngcolumn As Long r = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row