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

2013-09-20 Thread Hilary Lomotey
no probs i got it On Fri, Sep 20, 2013 at 2:54 PM, Hilary Lomotey wrote: > 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 wrote: > >> Try this >> >> Sub ROOTY() >> >> Dim r As

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 wrote: > Try this > > Sub ROOTY() > > Dim r As Long > Dim lngcolumn As Long > r = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row > lngcolumn = Sheet1.

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
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 wrote: > Hi, > > Replace these line > > If

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 wrote: > Hello Champs, > > i have written t

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

2013-09-20 Thread Hilary Lomotey
Hello Champs, i have written the macro below to clear the row contents if a certain criteria is met but am getting a type match error, pls assist with proper code. what i want is in col L if there is dont roll over i want the information on that row to be cleared ie only from A to Q of that parti