PC Review


Reply
Thread Tools Rate Thread

How could a formula return multiple values as concatenated text ?

 
 
exceluser
Guest
Posts: n/a
 
      21st Aug 2010
What formula could you place in the "Total Inventory" column to return
the results below ?

Fruit In Stock Total Inventory
Apple Yes Apple
Orange No Apple
Peach Yes Apple,Peach
Orange Yes Apple,Peach,Orange
Peach No Apple,Orange
 
Reply With Quote
 
 
 
 
Pete_UK
Guest
Posts: n/a
 
      22nd Aug 2010
Put this in C2:

=IF(A2="","",A2)

and put this in C3:

=IF(B3="Yes",IF(NOT(ISNUMBER(SEARCH(A3,C2))),C2&","&A3,C2),IF(AND(B3="No",ISNUMBER(SEARCH(A3,C2))),SUBSTITUTE(C2,IF(A3=A
$2,A3&",",","&A3),""),C2))


Copy the formula from C3 down the column as required. It works for
your sample data, as well as if A6 is either Apple or Orange, but may
need some tweaking on your real data.

Hope this helps.

Pete

On Aug 21, 10:16*pm, exceluser <ifmcqy7aias...@yahoo.com> wrote:
> What formula could you place in the "Total Inventory" column to return
> the results below ?
>
> Fruit * In Stock * * * *Total Inventory
> Apple * Yes * * Apple
> Orange *No * * *Apple
> Peach * Yes * * Apple,Peach
> Orange *Yes * * Apple,Peach,Orange
> Peach * No * * *Apple,Orange


 
Reply With Quote
 
exceluser
Guest
Posts: n/a
 
      26th Aug 2010
On Aug 21, 8:33*pm, Pete_UK <pashu...@auditel.net> wrote:
> Put this in C2:
>
> =IF(A2="","",A2)
>
> and put this in C3:
>
> =IF(B3="Yes",IF(NOT(ISNUMBER(SEARCH(A3,C2))),C2&","&A3,C2),IF(AND(B3="No",I*SNUMBER(SEARCH(A3,C2))),SUBSTITUTE(C2,IF(A3=A
> $2,A3&",",","&A3),""),C2))
>
> Copy the formula from C3 down the column as required. It works for
> your sample data, as well as if A6 is either Apple or Orange, but may
> need some tweaking on your real data.
>
> Hope this helps.
>
> Pete
>
> On Aug 21, 10:16*pm, exceluser <ifmcqy7aias...@yahoo.com> wrote:
>
>
>
> > What formula could you place in the "Total Inventory" column to return
> > the results below ?

>
> > Fruit * In Stock * * * *Total Inventory
> > Apple * Yes * * Apple
> > Orange *No * * *Apple
> > Peach * Yes * * Apple,Peach
> > Orange *Yes * * Apple,Peach,Orange
> > Peach * No * * *Apple,Orange- Hide quoted text -

>
> - Show quoted text -


Pete,

That was it !

You're the man.

Although the formula changed quite a bit, using the SEARCH function
was what I needed to use.

Thank you very much.


Exceluser
 
Reply With Quote
 
Pete_UK
Guest
Posts: n/a
 
      26th Aug 2010
You're welcome, and thanks for feeding back.

Pete

On Aug 26, 2:16*am, exceluser <ifmcqy7aias...@yahoo.com> wrote:
>
> Pete,
>
> * *That was it !
>
> * *You're the man.
>
> * *Although the formula changed quite a bit, using the SEARCH function
> was what I needed to use.
>
> * *Thank you very much.
>
> Exceluser

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text in middle of concatenated values CW Microsoft Access 3 14th Jan 2008 04:39 PM
return a concatenated formula into a cell =?Utf-8?B?Uml2ZXJHdWxseQ==?= Microsoft Excel Programming 2 3rd Oct 2007 01:59 AM
Re: Excel:Get concatenated text to be recognised as formula not text? Chip Pearson Microsoft Excel Misc 1 15th Jan 2007 01:39 PM
concatenated text to formula =?Utf-8?B?QmlsbCBFbGVyZGluZw==?= Microsoft Excel Misc 6 5th May 2005 01:11 AM
concatenated text string using lookup values =?Utf-8?B?c2Frb29s?= Microsoft Access 4 8th Feb 2005 04:51 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:52 AM.