A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Adding text to an IF statement effeciently



 
 
Thread Tools Display Modes
  #1  
Old February 5th, 2010, 03:59 PM posted to microsoft.public.excel.worksheet.functions
bishop
external usenet poster
 
Posts: 48
Default Adding text to an IF statement effeciently

I have the following code in a cell on Sheet A:

=IF(E41H41,"Rock on, Man! You are EXCEEDING your Stretch goal for the
month!",IF(E41=H41,"Nice work! You are meeting your stretch goal for the
month!",IF(E41=G41,"Great work. You are meeting your Target
goal.",IF(E41=F41,"You are meeting Threshold. Which is the bare
minimum.",IF(E41F41,"Um... so yeah... you might want to do some work,
Dude.")))))

What I would like to do is assign each quote to a variable on Sheet B like
such:

exceed = "Rock on, Man! You are EXCEEDING your Stretch goal for the month!"
stretch = "Nice work! You are meeting your stretch goal for the month!"
target = "Great work. You are meeting your Target goal."
threshold = "You are meeting Threshold. Which is the bare minimum."
slack = "Um... so yeah... you might want to do some work, Dude."

And I would like to replace the code above with something like this:

=IF(E41H41,exceed,IF(E41=H41,stretch,IF(E41=G41 ,target,IF(E41=F41,threshold,IF(E41F41,slack)))) )

What is the correct syntax to make this work?
  #2  
Old February 5th, 2010, 04:26 PM posted to microsoft.public.excel.worksheet.functions
Jim Thomlinson
external usenet poster
 
Posts: 2,641
Default Adding text to an IF statement effeciently

You can do that with Named Ranges. Named ranges return cell references
typically but there is no reason why it can not return a text string. Try
this...
Insert | Name | Define
Under names in this workbook: Add
Exceed
Under Refers to: add
= "Rock on, Man! You are EXCEEDING your Stretch goal for the month!"

Now in a cell type the formula
=Exceed

You can also use Exceed in your formulas just as you posted...
--
HTH...

Jim Thomlinson


"Bishop" wrote:

I have the following code in a cell on Sheet A:

=IF(E41H41,"Rock on, Man! You are EXCEEDING your Stretch goal for the
month!",IF(E41=H41,"Nice work! You are meeting your stretch goal for the
month!",IF(E41=G41,"Great work. You are meeting your Target
goal.",IF(E41=F41,"You are meeting Threshold. Which is the bare
minimum.",IF(E41F41,"Um... so yeah... you might want to do some work,
Dude.")))))

What I would like to do is assign each quote to a variable on Sheet B like
such:

exceed = "Rock on, Man! You are EXCEEDING your Stretch goal for the month!"
stretch = "Nice work! You are meeting your stretch goal for the month!"
target = "Great work. You are meeting your Target goal."
threshold = "You are meeting Threshold. Which is the bare minimum."
slack = "Um... so yeah... you might want to do some work, Dude."

And I would like to replace the code above with something like this:

=IF(E41H41,exceed,IF(E41=H41,stretch,IF(E41=G41 ,target,IF(E41=F41,threshold,IF(E41F41,slack)))) )

What is the correct syntax to make this work?

  #3  
Old February 5th, 2010, 08:51 PM posted to microsoft.public.excel.worksheet.functions
bishop
external usenet poster
 
Posts: 48
Default Adding text to an IF statement effeciently

Exactly what I was looking for. Thank you!

"Jim Thomlinson" wrote:

You can do that with Named Ranges. Named ranges return cell references
typically but there is no reason why it can not return a text string. Try
this...
Insert | Name | Define
Under names in this workbook: Add
Exceed
Under Refers to: add
= "Rock on, Man! You are EXCEEDING your Stretch goal for the month!"

Now in a cell type the formula
=Exceed

You can also use Exceed in your formulas just as you posted...
--
HTH...

Jim Thomlinson


"Bishop" wrote:

I have the following code in a cell on Sheet A:

=IF(E41H41,"Rock on, Man! You are EXCEEDING your Stretch goal for the
month!",IF(E41=H41,"Nice work! You are meeting your stretch goal for the
month!",IF(E41=G41,"Great work. You are meeting your Target
goal.",IF(E41=F41,"You are meeting Threshold. Which is the bare
minimum.",IF(E41F41,"Um... so yeah... you might want to do some work,
Dude.")))))

What I would like to do is assign each quote to a variable on Sheet B like
such:

exceed = "Rock on, Man! You are EXCEEDING your Stretch goal for the month!"
stretch = "Nice work! You are meeting your stretch goal for the month!"
target = "Great work. You are meeting your Target goal."
threshold = "You are meeting Threshold. Which is the bare minimum."
slack = "Um... so yeah... you might want to do some work, Dude."

And I would like to replace the code above with something like this:

=IF(E41H41,exceed,IF(E41=H41,stretch,IF(E41=G41 ,target,IF(E41=F41,threshold,IF(E41F41,slack)))) )

What is the correct syntax to make this work?

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:10 PM.


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