View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ben Ben is offline
external usenet poster
 
Posts: 509
Default Create a 'text' string based on whether values appear in other

Harlan

Thank you very much for this!!!

May I quickly ask, how can I insert a 'carriage return' to make the next
discount go on the next line??

Thanks

Ben




"Harlan Grove" wrote:

Ben wrote...
....
Service Child Group Disc_card1 Disc_card2 SeniorCitizen
1 50% 10% 60% 30%
2 50% 15% 25% 90%

....

If this table were in A1:F3,

I then want to create an adjacent cell, which populates a text field
"There is a 50% for children, 10% for Groups, No discounts for
Disc_card1"

....

then try this formula in cell G2.

="There is "&TEXT(B2,"[=0]\n\o;\a 0%")&" discount for children, "
&TEXT(C2,"[=0]\n\o;\a 0%")&" discount for groups, "
&TEXT(D2,"[=0]\n\o;\a 0%")&" discount for Disc_card1, "
&TEXT(E2,"[=0]\n\o;\a 0%")&" discount for Disc_card2, and "
&TEXT(F2,"[=0]\n\o;\a 0%")&" discount for senior citizens."

Fill G2 down into G3.