Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Statement to display 3 different outputs instead of 2

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default If Statement to display 3 different outputs instead of 2

Try

=IF(A1="P","Passed",(IF(A1="f","Failed",IF(A1="o", "Other",""))))

If this post helps click Yes
---------------
Jacob Skaria


"MikeyB" wrote:

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default If Statement to display 3 different outputs instead of 2

Hi,

Try this

=LOOKUP(A1,{"F","O","P"},{"Failed","Other","Passed "})

Mike

"MikeyB" wrote:

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default If Statement to display 3 different outputs instead of 2

Wow, thanks Jacob, that got it working a treat!

"Jacob Skaria" wrote:

Try

=IF(A1="P","Passed",(IF(A1="f","Failed",IF(A1="o", "Other",""))))

If this post helps click Yes
---------------
Jacob Skaria


"MikeyB" wrote:

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default If Statement to display 3 different outputs instead of 2

One easier way to tackle the several options is via using VLOOKUP
Assuming the data: p, f, o (presume you had a typo when you said: n ?)
would be entered in A2 down
you could have this in B2:
=IF(A2="","",VLOOKUP(A2,{"p","Passed";"f","Failed" ;"o","Other"},2,0))
Copy B2 down as far as required
aloha? hit the YES below
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---


"MikeyB" wrote:

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default If Statement to display 3 different outputs instead of 2

=INDEX({"Passed","Failed","Other"},MATCH(A1,{"P"," F","O"},))


"MikeyB" wrote:

I am trying to use an if statement to get 1 of a possible 3 inputs and then
display in a more human friendly manner, for example.

The 3 inputs a

p
n
o

If someone types in p then I would like to have Passed displayed, f should
display failed and o should display other. It works great if there are just
2 options but I cannot seem to find a solution for 3 variables.

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
If statement that outputs specific text if cell is not null mcmilja Excel Discussion (Misc queries) 2 June 4th 08 02:26 PM
=+SUM(S2:S36) outputs 19190fault EBux Excel Worksheet Functions 1 December 17th 07 10:17 PM
How do you display IF statement results in a different cell Neall Excel Worksheet Functions 3 June 23rd 07 10:39 PM
How do you display IF statement results in a different cell Neall Excel Worksheet Functions 7 June 22nd 07 08:53 PM
conditinal If statement with 3 outputs Arvi Laanemets Excel Worksheet Functions 5 November 6th 06 06:44 PM


All times are GMT +1. The time now is 09:06 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"