#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default multiple "if"

Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default multiple "if"

=IF(A1=1.2,"A",IF(A1=3.8,"B",IF(A1=15.31,"c")))

HIH
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default multiple "if"

Jarek,

Not sure I explained myself properly. Trying to get it to put an "A" if 1 or
2 appears, "B" if 3 or 8 appears etc.

Regards,

Nick

"Jarek Kujawa" wrote:

=IF(A1=1.2,"A",IF(A1=3.8,"B",IF(A1=15.31,"c")))

HIH

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default multiple "if"

Is that 3 or 8, or 3 through to 8?

--
HTH

Bob

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

"Nick C" wrote in message
...
Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default multiple "if"

Hi Bob,

That is 3 or 8. Appologies for any confusion caused.

Regards,

Nick

"Bob Phillips" wrote:

Is that 3 or 8, or 3 through to 8?

--
HTH

Bob

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

"Nick C" wrote in message
...
Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default multiple "if"

Set up a table of your numbers and letters somewhere (eg from X1
onwards), like this:

1 A
2 A
3 B
8 B
15 C
31 C

Then you can use:

=VLOOKUP(A1,X:Y,2,0)

Hope this helps.

Pete

On Jun 23, 11:20*am, Nick C wrote:
Hi Bob,

That is 3 or 8. Appologies for any confusion caused.

Regards,

Nick



"Bob Phillips" wrote:
Is that 3 or 8, or 3 through to 8?


--
HTH


Bob


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


"Nick C" wrote in message
...
Hello,


I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"


Thanks in advance.


Nick- Hide quoted text -


- Show quoted text -


  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default multiple "if"

Thanks Pete. Would still like to know how to do it using an IF formula, if it
is possible.

Regards,

Nick

"Pete_UK" wrote:

Set up a table of your numbers and letters somewhere (eg from X1
onwards), like this:

1 A
2 A
3 B
8 B
15 C
31 C

Then you can use:

=VLOOKUP(A1,X:Y,2,0)

Hope this helps.

Pete

On Jun 23, 11:20 am, Nick C wrote:
Hi Bob,

That is 3 or 8. Appologies for any confusion caused.

Regards,

Nick



"Bob Phillips" wrote:
Is that 3 or 8, or 3 through to 8?


--
HTH


Bob


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


"Nick C" wrote in message
...
Hello,


I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"


Thanks in advance.


Nick- Hide quoted text -


- Show quoted text -



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default multiple "if"

If you are using XL2003 or earlier, you are limited to 7 nested
functions in a formula. In the example you gave you will be within
this limit, but if you have more conditions you will quickly exceed
it, whereas the VLOOKUP approach does not suffer from this limitation.

Pete


On Jun 23, 12:04*pm, Nick C wrote:
Thanks Pete. Would still like to know how to do it using an IF formula, if it
is possible.

Regards,

Nick

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default multiple "if"

=IF(OR(A1=1,A1=2),"A",IF(OR(A1=3,A1=8),"B",IF(OR(A 1=15,A1=31),"C","")))

--
HTH

Bob

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

"Nick C" wrote in message
...
Hi Bob,

That is 3 or 8. Appologies for any confusion caused.

Regards,

Nick

"Bob Phillips" wrote:

Is that 3 or 8, or 3 through to 8?

--
HTH

Bob

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

"Nick C" wrote in message
...
Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick






  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default multiple "if"

Many thanks Bob. Works a treat.

Regards,

Nick

"Bob Phillips" wrote:

=IF(OR(A1=1,A1=2),"A",IF(OR(A1=3,A1=8),"B",IF(OR(A 1=15,A1=31),"C","")))

--
HTH

Bob

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

"Nick C" wrote in message
...
Hi Bob,

That is 3 or 8. Appologies for any confusion caused.

Regards,

Nick

"Bob Phillips" wrote:

Is that 3 or 8, or 3 through to 8?

--
HTH

Bob

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

"Nick C" wrote in message
...
Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick








  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 44
Default multiple "if"

"Nick C" wrote in message
...
Hello,

I have a various list of numbers. I want to do one of those fancy if
formulas to say if 1, 2 then "A", if 3, 8 then "B", if 15, 31 then "c"

Thanks in advance.

Nick


Have a look at the VLookup formula - it is easier than nested if statements
if you have more than a couple of results.

In part of the spreadsheet not used create you list:
1 A
2 A
3 B
8 B
15 c
31 c
etc.

then use vlookup to find a number in column 1 and it will display the text
in column 2.


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
Multiple "source" workbooks linked to single "destination" workboo DAVEJAY Excel Worksheet Functions 1 September 17th 07 05:33 PM
Combining formulas, "and" & "or" to verify content of multiple cel Shu of AZ Excel Discussion (Misc queries) 15 October 15th 06 11:22 PM
"Control" plus "click" doesn't allow me to select multiple cells Ken Cooke New Users to Excel 0 September 25th 06 04:46 PM
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
freeze window creates multiple "views" suffixed with ":n" dgaex001 Excel Discussion (Misc queries) 5 March 22nd 06 05:28 PM


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