Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default =IF(B8="M","HI") OK but =IF(B8="M","HI")+IF(B8="x","bye") not why

I'm trying to enter a formula similar to
=IF(B1=0,"0")+IF(B1=1,A1*1)+IF(B1=2,A1*2)
but instead of A1*1 or 2 etc. I want the result to return a text response
such as
=IF(B1="Hi","Hello")+IF(B1="Bye","Good bye") but this results in an error.
What am I doing wrong?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,574
Default =IF(B8="M","HI") OK but =IF(B8="M","HI")+IF(B8="x","bye") not why

=IF(B1="Hi","Hello","Good bye")

This assumes that the only two possible values in B1 are "hi" or "bye".

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


"Nater" wrote:

I'm trying to enter a formula similar to
=IF(B1=0,"0")+IF(B1=1,A1*1)+IF(B1=2,A1*2)
but instead of A1*1 or 2 etc. I want the result to return a text response
such as
=IF(B1="Hi","Hello")+IF(B1="Bye","Good bye") but this results in an error.
What am I doing wrong?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default =IF(B8="M","HI") OK but =IF(B8="M","HI")+IF(B8="x","bye") not why

You can't add two text strings together - use & instead of + between
the two If statements.

Hope this helps.

Pete


On Feb 14, 3:22 pm, Nater wrote:
I'm trying to enter a formula similar to
=IF(B1=0,"0")+IF(B1=1,A1*1)+IF(B1=2,A1*2)
but instead of A1*1 or 2 etc. I want the result to return a text response
such as
=IF(B1="Hi","Hello")+IF(B1="Bye","Good bye") but this results in an error.
What am I doing wrong?



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default =IF(B8="M","HI") OK but =IF(B8="M","HI")+IF(B8="x","bye") not why


try this idea
=if(b1=0,"joe","")&if(b2=1," played","")
but maybe you just want to nest em
if(b1=0,dothis,if(b1=1,dothat,""))
--
Don Guillett
SalesAid Software

"Nater" wrote in message
...
I'm trying to enter a formula similar to
=IF(B1=0,"0")+IF(B1=1,A1*1)+IF(B1=2,A1*2)
but instead of A1*1 or 2 etc. I want the result to return a text response
such as
=IF(B1="Hi","Hello")+IF(B1="Bye","Good bye") but this results in an error.
What am I doing wrong?



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 347
Default =IF(B8="M","HI") OK but =IF(B8="M","HI")+IF(B8="x","bye") not why

Hi,

Maybe this is what you're looking for:

=IF(B1="Hi","Hello",IF(B1="Bye","Good Bye",""))

HTH
Jean-Guy

"Nater" wrote:

I'm trying to enter a formula similar to
=IF(B1=0,"0")+IF(B1=1,A1*1)+IF(B1=2,A1*2)
but instead of A1*1 or 2 etc. I want the result to return a text response
such as
=IF(B1="Hi","Hello")+IF(B1="Bye","Good bye") but this results in an error.
What am I doing wrong?

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
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
create links to check boxes marked "good" fair"and "bad" pjb Excel Worksheet Functions 3 April 20th 06 02:17 AM
Complex if test program possible? If "value" "value", paste "value" in another cell? jseabold Excel Discussion (Misc queries) 1 January 30th 06 10:01 PM
Insert "-" in text "1234567890" to have a output like this"123-456-7890" Alwyn Excel Discussion (Misc queries) 3 October 25th 05 11:36 PM


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

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

About Us

"It's about Microsoft Excel"