Can this be done?

  • Thread starter Thread starter Mike Mike
  • Start date Start date
M

Mike Mike

Is it possible to move column B fields to the row with matching content in A

From this:

A B
bananas yellow
oranges candy
pigs bananas
cows blue
candy
blue
red
yellow

To this:

A B
bananas bananas
oranges
pigs
cows
candy candy
blue blue
red
yellow yellow


Regards
Mike
 
I'd insert a new column B (shifting column B to column C), then use a formula
like this in B1:

=if(isnumber(match(a1,c:c,0)),a1,na())
and drag down as far as you want.

Then Select column B
edit|copy
Edit|paste special|values

then with column B still selected
edit|Replace
what: #n/a
with: (leave blank)
replace all

and delete column C (which holds the data in the old order).

Be aware that any value in column B that doesn't appear in column A will be lost
using this technique.
 

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

Back
Top