View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JTJ JTJ is offline
external usenet poster
 
Posts: 2
Default Help: Find Matching Cells, If - Then Move Cell With Self

On Jul 17, 11:04*am, GS wrote:
JTJ was thinking very hard :









Can someone provide VBA for the following scenario:


Spreadsheet contains many rows with many columns. Each cell within
each row contains columns that defind a persons information i.e. first
name, middle initial, last name, DOB, address, City, State, Zip, and a
column that defines relationship. Relationships being either: Self,
Spouse, Child, Other.
One spreadsheet can contain many different individuals some with
family some not.


My need is:


-when the address matches (and I think it only needs to look at the
address column, does not need to look in the city, state, or zip) then
-move the 'Self' row as the first row with the remaining rows
following


For example: right now I have to 'cut' the 'Self' row for a family
with a matching address and 'insert cut field' into the first
instance / position / row for a particular family.


When you have 1000's of rows this can take some time.


Any help would be greatly appreciated!


Did you try sorting by address+relationship? You'll need to prefix the
word "Self" with a space or underscore if you want it to appear above
all others with the same address.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Thanks Garry!