Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Copying all rows that have the right requirements!


Hello.

I need a loop that checks all rows in a sheet if a cell contains a
specific input and then copys the row to another worksheet.
How do I do that the simpliest way?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=520057

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copying all rows that have the right requirements!

Hi Anders,

Look at the possibility of using Excel's built in Advanced Filter feature.

If you are not familiar with this feature, see Debra Dalgleish's tutorial
at:

http://www.contextures.com/xladvfilter01.html

If you need to automate the process, turn on the macro recorder while you
perform the required steps manually. The resultant code may be edited to
provide more general application.


If you expreience ant problems with such editing, post back with details.


---
Regards,
Norman



"a94andwi" wrote in
message ...

Hello.

I need a loop that checks all rows in a sheet if a cell contains a
specific input and then copys the row to another worksheet.
How do I do that the simpliest way?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile:
http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=520057



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Copying all rows that have the right requirements!

For i = 1 To Cells(Rows.Count,"A").End(xlUp).Row
If Cells(i,"A").Value = "somevalue" Then
j=j+1
Rows(i).Copy Worksheets("Sheet2").Range("A" & j)
End If
Next i

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"a94andwi" wrote in
message ...

Hello.

I need a loop that checks all rows in a sheet if a cell contains a
specific input and then copys the row to another worksheet.
How do I do that the simpliest way?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile:

http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=520057



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copying all rows that have the right requirements!

Hi a94andwi

One way
http://www.rondebruin.nl/copy5.htm

Or use EasyFilter
http://www.rondebruin.nl/easyfilter.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"a94andwi" wrote in message
...

Hello.

I need a loop that checks all rows in a sheet if a cell contains a
specific input and then copys the row to another worksheet.
How do I do that the simpliest way?

/Anders


--
a94andwi
------------------------------------------------------------------------
a94andwi's Profile: http://www.excelforum.com/member.php...o&userid=21077
View this thread: http://www.excelforum.com/showthread...hreadid=520057



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
Copying & Inserting Rows w/o Affecting other Rows Etc. LRay67 Excel Worksheet Functions 1 October 22nd 08 02:10 AM
Material Requirements Plan (MRP) and Capacity Requirements Plan (C Tricia Young Excel Worksheet Functions 1 February 1st 07 06:55 AM
Material Requirements Planning-MRP/Capacity Requirements Planning- Tricia Young Excel Discussion (Misc queries) 1 February 1st 07 06:22 AM
Copying multiple rows to other worksheets (but amount of rows varies) - How? David Smithz Excel Discussion (Misc queries) 1 June 18th 06 04:31 PM
If statement with two requirements Matt Excel Worksheet Functions 4 February 13th 05 12:49 PM


All times are GMT +1. The time now is 01:22 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"