ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find RangeCopyInsert into Sheet (https://www.excelbanter.com/excel-programming/371548-find-range-copy-insert-into-sheet.html)

Rob

Find RangeCopyInsert into Sheet
 
I am trying to find a macro/sub that will search for a cell that meets a
condition then select that entire row a copy it into another worksheet. Then
it needs to continue the search for more and do the same until the end of the
originating worksheet.

Any Ideas or offers?

Thanks in Advance.
Rob

Gord Dibben

Find RangeCopyInsert into Sheet
 
Have a look at Ron deBruin's site.

http://www.rondebruin.nl/copy1.htm

Lots of code there which should give you some ideas.


Gord Dibben MS Excel MVP

On Sun, 27 Aug 2006 16:44:01 -0700, Rob wrote:

I am trying to find a macro/sub that will search for a cell that meets a
condition then select that entire row a copy it into another worksheet. Then
it needs to continue the search for more and do the same until the end of the
originating worksheet.

Any Ideas or offers?

Thanks in Advance.
Rob



Tom Ogilvy

Find RangeCopyInsert into Sheet
 
Also, to consider (same site)
http://www.rondebruin.nl/copy5.htm

might be more on the mark.

--
Regards,
Tom Ogilvy

"Gord Dibben" <gorddibbATshawDOTca wrote in message
...
Have a look at Ron deBruin's site.

http://www.rondebruin.nl/copy1.htm

Lots of code there which should give you some ideas.


Gord Dibben MS Excel MVP

On Sun, 27 Aug 2006 16:44:01 -0700, Rob
wrote:

I am trying to find a macro/sub that will search for a cell that meets a
condition then select that entire row a copy it into another worksheet.
Then
it needs to continue the search for more and do the same until the end of
the
originating worksheet.

Any Ideas or offers?

Thanks in Advance.
Rob





Gord Dibben

Find RangeCopyInsert into Sheet
 
"more on the mark" is for certain.

Gord




On Sun, 27 Aug 2006 20:23:16 -0400, "Tom Ogilvy" wrote:

Also, to consider (same site)
http://www.rondebruin.nl/copy5.htm

might be more on the mark.


Gord Dibben MS Excel MVP

Rob

Find RangeCopyInsert into Sheet
 
Ok I must be really slow on the understanding...

Set WS = Sheets("sheet1") '<<< Change *** This I Get ***
'A1 is the top left cell of your filter range and the header of the
first column
Set rng = WS.Range("A1").CurrentRegion '<<< Change *** I don't get what
to change ".Currentregion" to ***
Str = "Netherlands" '<<< Change *** I have no clue of what to do with
this ***

This is a synopsis of what I am trying to do...

My data starts on Cell A7

The code in A7 and every 10th cell down afterward is "=LEFT(A8,4)" Cells
B,C,D,E,& F 7 are empty but are colored. Range A8:F17 has all the important
data. My Key Cell for the search that I want to have the code look for is
Cell A9 and every tenth one after that. Below is the code that provides the
value that is displayed in Cell A9...


"=IF(RC[2]=FALSE,"""",IF(R[1]C[2]=FALSE,RC[2],IF(R[2]C[2]=FALSE,R[1]C[2],IF(R[3]C[2]=FALSE,R[2]C[2],IF(R[4]C[2]=FALSE,R[3]C[2],IF(R[5]C[2]=FALSE,R[4]C[2],IF(R[6]C[2]=FALSE,R[5]C[2],IF(R[7]C[2]=FALSE,R[6]C[2],R[7]C[2]))))))))"

Yes I made that code and it works supremely, the actual value that is
displayed in Cell A9 is a date and the date is formatted as "mm-dd-yy". Now
Cell D4 has the current day's date in it and is formatted as "dd-mmm-yyyy"


I would like to be able to search all the cells that are A9, A19, A29 etc.
on down to whatever for the value that is equal to or greater than todays
date minus three days ago. If the date in cell A99 is at least three days old
then it selects A99's related range of A97:F106. The it copies that range
into a different sheet and continues the search for any other matches. When
it's done it displayes a message that's something like MsgBox("All Done
Searching Boss",vbOK).

Well That's my long winded explaination. Anybody care to help? You would be
a god if you did.

Either way I thank you in advance, Especially if you took the time to really
read this in hopes of helping.

Thank You,
Rob



"Gord Dibben" wrote:

"more on the mark" is for certain.

Gord




On Sun, 27 Aug 2006 20:23:16 -0400, "Tom Ogilvy" wrote:

Also, to consider (same site)
http://www.rondebruin.nl/copy5.htm

might be more on the mark.


Gord Dibben MS Excel MVP



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

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