Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting row
My macro doesn't seem to do anything could I have some input?
Dim lastrow As Long, i As Long lastrow = Cells(Rows.Count, 1).End(xlUp).Row For i = lastrow To 1 Step -1 If LCase(Cells(i,"Q").Value) = "Closed" Then Rows(i).Delete End If Next End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200703/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting row
Hi John
If LCase(Cells(i,"Q").Value) = "Closed" Then change to If LCase(Cells(i,"Q").Value) = "closed" Then -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John via OfficeKB.com" <u27679@uwe wrote in message news:6f6bb073be44c@uwe... My macro doesn't seem to do anything could I have some input? Dim lastrow As Long, i As Long lastrow = Cells(Rows.Count, 1).End(xlUp).Row For i = lastrow To 1 Step -1 If LCase(Cells(i,"Q").Value) = "Closed" Then Rows(i).Delete End If Next End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200703/1 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting row
I tried uppercase and lower case but still nothing it just...does absolutly
nothing lol Ron de Bruin wrote: Hi John If LCase(Cells(i,"Q").Value) = "Closed" Then change to If LCase(Cells(i,"Q").Value) = "closed" Then My macro doesn't seem to do anything could I have some input? [quoted text clipped - 6 lines] Next End Sub -- Message posted via http://www.officekb.com |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
deleting row
Hi John
Are you sure that column A have data ? Maybe there are spaces in the cell, the value is maybe " Closed" ? See this page for examples http://www.rondebruin.nl/delete.htm -- Regards Ron de Bruin http://www.rondebruin.nl/tips.htm "John via OfficeKB.com" <u27679@uwe wrote in message news:6f6bb073be44c@uwe... My macro doesn't seem to do anything could I have some input? Dim lastrow As Long, i As Long lastrow = Cells(Rows.Count, 1).End(xlUp).Row For i = lastrow To 1 Step -1 If LCase(Cells(i,"Q").Value) = "Closed" Then Rows(i).Delete End If Next End Sub -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200703/1 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Deleting the text without deleting the formula | Excel Worksheet Functions | |||
Deleting cell data without deleting formula | Excel Discussion (Misc queries) | |||
deleting values in a worksheet without deleting the formulas | Excel Worksheet Functions | |||
how prevent formula in cell from deleting when deleting value???? | New Users to Excel | |||
Deleting Hyphens or Dashes from multiple cells without deleting the remaining content | Excel Programming |