Selecting rows based on a value
On Nov 19, 7:14*am, Jeff Parrott
wrote:
I have a large spreadsheet that I need to sort on a daily basis. I have
several macros that I use to sot and delete rows but I can't figure out how
to do one thing.
The rows all contain data based on warehouse locations. The first column of
the sheet lists all of the warehouses based on letter designations (A,B,C....)
I want to select the rows containing data related to warehouse "A" and delete
everything else. Any suggestions?
--
Whether you think you can or cannot, you're right. - Henry Ford
Sub RemoveAllButA ()
Dim i
For each i in range("A:A")
If i < "A" then
i.entirerow.delete
Else
goto e
End if
E:
Next i
End Sub
This is untested, but should get you in the right direction.
Jay
|