Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sotiris_s
 
Posts: n/a
Default Select rows based on criteria

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
  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default Select rows based on criteria

Use the filter (DataFilterAutofilter) to make the selection, then just
copy and paste the visible rows.

--

HTH

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


"sotiris_s" wrote in message
...
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



  #3   Report Post  
anar_baku
 
Posts: n/a
Default Select rows based on criteria


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.


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=484781

  #4   Report Post  
sotiris_s
 
Posts: n/a
Default Select rows based on criteria

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!

"anar_baku" wrote:


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.


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile: http://www.excelforum.com/member.php...o&userid=18259
View this thread: http://www.excelforum.com/showthread...hreadid=484781


  #5   Report Post  
Bob Phillips
 
Posts: n/a
Default Select rows based on criteria

Why?

--

HTH

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


"sotiris_s" wrote in message
...
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!

"anar_baku" wrote:


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.


--
anar_baku
------------------------------------------------------------------------
anar_baku's Profile:

http://www.excelforum.com/member.php...o&userid=18259
View this thread:

http://www.excelforum.com/showthread...hreadid=484781




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dragging to select multiple rows causes out of control scroll ronlee67 Excel Discussion (Misc queries) 7 February 14th 08 10:19 PM
Select rows and sort based on type Sarah Excel Discussion (Misc queries) 0 October 11th 05 06:06 PM
Select Rows dependant on certain field data Maddy New Users to Excel 1 July 27th 05 04:50 PM
Is it possible to use the sumif function based on the criteria of. Shelba Excel Worksheet Functions 1 February 2nd 05 06:40 AM
Counting "rows", i.e. simultaneous criteria for multiple cells gkline Excel Worksheet Functions 2 November 19th 04 08:30 AM


All times are GMT +1. The time now is 07:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"