Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   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 cel

Hello

Hope someone can help... I have a basic table:

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

For each 'service' I may offer a discount to children, senior citizens or
those with discount cards.

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"

Is there a formula that will do an 'if' query to see if there is a value in
a cell, if there is turn that into a sentence and put it into a text table (I
guess I will need to use 'CONCATENATE' some where?)

Please help!!

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Create a 'text' string based on whether values appear in other cel

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.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,593
Default Create a 'text' string based on whether values appear in other cel

=IF(A2<"",TEXT(A2,"0%"),"No")&" discount for
children,"&IF(B2<"",TEXT(B2,"0%"),"No")&" discount for
groups,"&IF(C2<"",TEXT(C2,"0%"),"No")&" discount for Disc card
1,"&IF(D2<"",TEXT(D2,"0%"),"No")&" discount for Disc card 2"

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Ben" wrote in message
...
Hello

Hope someone can help... I have a basic table:

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

For each 'service' I may offer a discount to children, senior citizens or
those with discount cards.

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"

Is there a formula that will do an 'if' query to see if there is a value
in
a cell, if there is turn that into a sentence and put it into a text table
(I
guess I will need to use 'CONCATENATE' some where?)

Please help!!

Thanks



  #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.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 733
Default Create a 'text' string based on whether values appear in other

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

....

="... one discount"&CHAR(10)&"another discount ..."

but you need to set the cell to wrap, and you may have to increase
column widths.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I take a string of text and convert it ASCII Values? KBos@Minuteman Excel Discussion (Misc queries) 4 April 2nd 23 08:57 PM
Averaging Columns based on a Text String Gene Haines New Users to Excel 9 September 19th 06 03:16 AM
How do I use IF in Excel to string the two text values (high,low) frankofile Excel Worksheet Functions 5 December 1st 05 03:18 AM
Extrapolate numeric values from text string Henrik Excel Worksheet Functions 4 November 3rd 05 06:25 PM
Count unique values and create list based on these values vipa2000 Excel Worksheet Functions 7 August 5th 05 01:17 AM


All times are GMT +1. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"