Concatenating info from several cells into the one above

M

method373

Hey guys,

I'm trying to pull info from a number of cells into one cell, the only
thing is that the number of cells I'm referencing change, for example,
one cell might pull info from 3 cells below, and another might pull
info from the 8 cells below. Basically, I'm trying to pull info from
all the children items into a parent item. It should pull all the info
from the children until it hits a blank cell - that blank cell is the
new parent.

I have attached a screenshot of the sample data. In the first one, you
can see that D2 should pull all the info from D3 - D5, D6 should pull
info from D7 - D9, and D10 should pull all the info from D11-D16

Any help is appreciated!

Thanks


4386


+-------------------------------------------------------------------+
|Filename: excel2.JPG |
|Download: http://www.excelforum.com/attachment.php?postid=4386 |
+-------------------------------------------------------------------+
 
D

daddylonglegs

Do you want to do this with formulas or code?

It's tricky with a formula because you want the result in the same
column as the data. Can I suggest using column E? Using MCONCAT
function from the MOREFUNC add-in you can use this formula in E2 copied
down

=IF(D2<>"",D2,MCONCAT(D3:INDEX(D3:D$100,MATCH(TRUE,D3:D$100="",0))))

confirmed with CTRL+SHIFT+ENTER

MOREFUNC add-in is available to download from here

http://www.rhdatasolutions.com/morefunc/
 

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