extracting data from a table

M

mitch

I have a 2-column, 4-row matrix/table that looks like

c1 c2
r1 bob x
r2 ed
r3 tom x
r4 hal

In columns 1-4 in a row below the table, I would like to extract the names
in columns 1-4 only if they have an "x" by their names in the table,

the row would look like

column 1 "bob", column 2 "tom", column 3 blank, column 4 blank

Note that I can not put a blank in column just becuase row 2 does not have
an "x", I need to populate the row with all names that have an "x" by them
withouth skipping. I can not use a pivot table becuase it is for somebody
that does not know how to use them

help??
 
M

Max

One play which delivers it for you

With the source data below in A1:B4

bob x
ed
tom x
hal

In A6:
=IF(INDEX($B$1:$B$4,COLUMNS($A:A))="x",COLUMN(),"")

In A7
=IF(COLUMNS($A:A)>COUNT($A$6:$D$6),"",(INDEX($A$1:$A$4,SMALL($A$6:$D$6,COLUMNS($A:A)))))
Select A6:A7, copy across by 4 cols to D7. Minimize/hide away row 6. A7:D7
will return the required results, neatly bunched to the left as desired.
 

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