Help: Find Matching Cells, If - Then Move Cell With Self

J

JTJ

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!
 
G

GS

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.
 
J

JTJ

JTJ was thinking very hard :
















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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top