View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
RagDyeR RagDyeR is offline
external usenet poster
 
Posts: 3,572
Default IF formula for a number range specification

Since you didn't post your entire range of numbers, I plugged these in as an
example:

10 - 14
15 - 140
141 - 250
251 - 400
401 - 600

And try this:

=IF(OR(A2<10,A2600),"Error",MATCH(A2,{10,15,141,2 51,401}))
--
HTH,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

"Quimera" wrote in message
news:yhlhm.41272$PH1.16685@edtnps82...
I need a nested IF formula that can assign a code to a range of numbers.
There are 5 ranges.

For example...If (A2=10 and <=14, "1", IF (A2=15 and
<=140,"2"),IF(......."5"),"Error"))

I don't know how to define the range.

Thank you for your always helpful help.

Rose