suppress duplicate leading cells

G

Guest

I have a worksheet where data could be the same for first two columns of some
rows. I would like to supress this and show the data only on one line.
e.g if I my data is like
Apples green type1 10
Apples green type2 12
Apples red type1 9
Apples red type3 21
Pears green type2 5
Pears green type1 14

Then I would like it to be displayed as
Apples green type1 10
type2 12
red type1 9
type3 21
Pears green type2 5
type1 14

What do I have to do to achieve this?
Thank you for any help.
 
R

robert111

you could write a simple macro that checks each cell in col 1 and col 2

eg if a2=a1 then delete a2

apples GREEN TYPE1 10
apples GREEN TYPE2 12
pears GREEN TYPE2 30

becomes

apples GREEN TYPE1 10
TYPE2 12
pears GREEN TYPE2 30


Then you could concatenate A1,B1,C1,D1
A2,B2,C2,D2 ETC ETC

AND PUT THE RESULT IN ONE CELL IF YOU DESIRE

A B C D E
TYPE2 10 TYPE2 10
 

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

Similar Threads


Top