Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
PhilGTI
 
Posts: n/a
Default IF statement, can it equal more than one number?

=IF(AD2=125or135or475, A,(IF(AD2=160or195or215, C,O)))

Column AD has commodity codes 100,101,102.520.
I need Column AE to display a group designator A, C, G, and O. All
420 of the commodity codes fall into one of these four groups. I need this
group designator so I can sort the data, and move to another worksheet for
calculation.
Ive got it to work with a single commodity code-
=IF(AD2="125","A",(IF(D2="160","C","O")))

Ive tried using the formula above but I dont know the syntax if AD2 =
more than one number.
Is this possible?

Thanks for your help, and any thoughts on an easier way to do this would be
appreciated.


  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

=IF(OR(AD2="125",AD2="135",AD2="475"), "A",IF(OR(AD2="160",AD2="195",AD2="
215"), "C","O"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"PhilGTI" wrote in message
...
=IF(AD2="125"or"135"or"475", "A",(IF(AD2="160"or"195"or"215", "C","O")))

Column AD has commodity codes 100,101,102..520.
I need Column AE to display a group designator "A", "C", "G", and "O".

All
420 of the commodity codes fall into one of these four groups. I need

this
group designator so I can sort the data, and move to another worksheet for
calculation.
I've got it to work with a single commodity code-
=IF(AD2="125","A",(IF(D2="160","C","O")))

I've tried using the formula above but I don't know the syntax if AD2 =
more than one number.
Is this possible?

Thanks for your help, and any thoughts on an easier way to do this would

be
appreciated.




  #3   Report Post  
PhilGTI
 
Posts: n/a
Default

Thanks Bob!

"Bob Phillips" wrote:

=IF(OR(AD2="125",AD2="135",AD2="475"), "A",IF(OR(AD2="160",AD2="195",AD2="
215"), "C","O"))


--

HTH

RP
(remove nothere from the email address if mailing direct)


"PhilGTI" wrote in message
...
=IF(AD2="125"or"135"or"475", "A",(IF(AD2="160"or"195"or"215", "C","O")))

Column AD has commodity codes 100,101,102..520.
I need Column AE to display a group designator "A", "C", "G", and "O".

All
420 of the commodity codes fall into one of these four groups. I need

this
group designator so I can sort the data, and move to another worksheet for
calculation.
I've got it to work with a single commodity code-
=IF(AD2="125","A",(IF(D2="160","C","O")))

I've tried using the formula above but I don't know the syntax if AD2 =
more than one number.
Is this possible?

Thanks for your help, and any thoughts on an easier way to do this would

be
appreciated.





  #4   Report Post  
Fredrik Wahlgren
 
Posts: n/a
Default


"PhilGTI" wrote in message
...
Thanks Bob!

"Bob Phillips" wrote:

=IF(OR(AD2="125",AD2="135",AD2="475"),

"A",IF(OR(AD2="160",AD2="195",AD2="
215"), "C","O"))



If you have lots of formulas like these, you should consider making a User
Defined Function.
/Fredrik


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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
How do I fix a circular reference in a financial statement? drjayhawk25 Excel Discussion (Misc queries) 0 February 7th 05 05:19 PM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 04:45 PM
when writing an IF statement what is the syntax for "Not Equal to. NEEDTOKNOW Excel Discussion (Misc queries) 1 December 10th 04 04:32 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


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

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"