• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

combining multiple conditional output into a list in single cell

oren27

New Member
Assume i have


Row 1 header row:

names of fruit in 5 diff columns (i actually have 20, but using small numbers for simplicity): Apple, Orange, Grape, Banana, Lemon


Column 1:

lists vitamins: Vitamin B, C, D, E, F, G, etc.


each fruit has a combination of vitamins, all, some or none.


in column 2, adjacent for each of the vitamins, I would like to list the fruits that contain such vitamin, in a list, within a single cell.


so column 2, in a cell that adjacent to "Vitamin D" in column 1, will say:

- Apple

- Lemon

- Grape


I need the list to be organized. any help will be appreciated.
 
Hi, oren27!


First of all welcome to Chandoo's website Excel forums. Thank you for your joining us and glad to have you here.


As a starting point I'd recommend you to read the three first green sticky topics at this forums main page. There you'll find general guidelines about how this site and community operates (introducing yourself, posting files, netiquette rules, and so on).


Among them you're prompted to perform searches within this site before posting, because maybe your question had been answered yet.


Feel free to play with different keywords so as to be led thru a wide variety of articles and posts, and if you don't find anything that solves your problem or guides you towards a solution, you'll always be welcome back here. Tell us what you've done, consider uploading a sample file as recommended, and somebody surely will read your post and help you.


And about your question...


Give a look at this file and check if it's what you're looking for as I have my doubts about where and how is the relation fruit-vitamin:

https://dl.dropbox.com/u/60558749/combining%20multiple%20conditional%20output%20into%20a%20list%20in%20single%20cell%20%28for%20oren27%20at%20chandoo.org%29.xlsx


Regards!
 
apologies ! I was too anxious to get an answer and missed out on the introduction request.

I just posted an introduction and read the site rules and info. Thank you for that.

Your answer's output is exactly what i was looking for. appreciate the quick response.


If i were to have 30 columns with fruit names instead of 5, is there a more efficient way to structure the formula so it is nice and short (using arrays or otherwise) than to continue to add IF statements?

very much appreciated !
 
Hi, oren27!

Glad you solved it.

Regarding your last question, I'm afraid that without VBA code (macro) it isn't possible with only formulas; if I happen to say gotcha! and caught a new idea, I'll post it here.

Thanks for your feedback and for your kind words too. And welcome back whenever needed or wanted.

Regards!
 
Back
Top