ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copying all rows that have the right requirements! (https://www.excelbanter.com/excel-programming/355415-copying-all-rows-have-right-requirements.html)

a94andwi[_22_]

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


Norman Jones

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




Bob Phillips[_6_]

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




Ron de Bruin

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





All times are GMT +1. The time now is 10:37 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com