Select rows based on criteria

S

sotiris_s

Hello,
i have a worksheet with data (numeric,text) from the A collum up to the AH
each row is a new data entry, (sometimes i have up to 2500 entries) so
i need to find out, how i can with some criteria such as <if the value at
the cullum V is above 110> for example then give me all the row in a new
worksheet inside the same xls file. It is tricky for me to do that... i have
good hadling of the if command and the option to make an auto filter is not
the goal.... the logic is that i want to do that in a kind of auto...
thank you for your help in advance
Sotiris S
 
B

Bob Phillips

Use the filter (Data>Filter>Autofilter) to make the selection, then just
copy and paste the visible rows.

--

HTH

RP
(remove nothere from the email address if mailing direct)
 
A

anar_baku

I think you might need something like this:

Sub Macro1()
For Each c In Worksheets("Sheet1").Range("A1:B5").Cells
If Abs(c.Value) > 110 Then Rows().Select
Next
End Sub

Two problems with the above code though:
1. You have to specify the range
2. You need something inside the () in Rows to tell VBA that it needs
to select the row, whose column contains a value greater than 110.

Sorry, I'm not very good with VBA, hope someone can improve on above.
 
S

sotiris_s

thank you all for the help,
i think its true the most easy way is to do it with the autofilter,
but the goal is to make it work without it!!!
i have a thought of multiple if and row transfer....
and then with a macro to hide the error formulas....
but i have no other options..... if i want something more special i think
that the access is the way? or just take the autofilter..... any other
opinion?
thanks all of you!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top