View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Pilotflyby via OfficeKB.com Pilotflyby via OfficeKB.com is offline
external usenet poster
 
Posts: 1
Default Find and instance of "X" and all rows between the next instance of

Thank you MSweetG222 for your suggestion. I will work with your idea this
weekend and see what happens.

-Mark.

MSweetG222 wrote:
Pilotflyby,

Consider the following...
1. In Col K, title it "Related Records" and insert the following formula
=IF(RIGHT(A2,4)="Root",A2,K3) for all record rows. I think you will get the
general idea of the formula. Modify it as needed to fit your case.
This will give your records a key that ties them together.
Copy & paste col K as values.
2. determine all the unique keys in the Related Records column
3. create a loop using the Related Records column
4. Autofilter the Related Records column for the 1st value (ex. 4 Root)
5. Copy & paste visible cells to desired location
6. Delete Column K
7. Save w/b or any other steps you need to perform
8. Continue until completed

The key is to create a relationship between the various rows. Hope this
gives you a starting point.

Column A contains the text "Root" and then rows of data before the next
"Root" in column A. I need to find the first instance of "Root" copy that

[quoted text clipped - 43 lines]

Mark.


--
Message posted via http://www.officekb.com