View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
StumpedAgain StumpedAgain is offline
external usenet poster
 
Posts: 192
Default I need help with an if statement that has more than 7 nested condi

The following should do the trick. You can get as specific as you want. I
got lazy at the end because there are gaps in the flight numbers. For what
you posted though, this will work. :)

=IF(A1<1300,"A",IF(A1<1300,"B",IF(A1<2000,"A",IF(A 1<3170,"B",IF(A1<3500,"C",IF(A1<5000,"B",IF(A1<600 0,"D",IF(A1<9000,"E","C"))))))))
--
-SA


"Mercedes" wrote:

Hi, I am not able to get this although I thought it would be easy. The
problem is that I need more than 7 nested if statements.

I have a column with different flight numbers that correspond to different
carriers:
Flight # Carrier
1-1199 A
1300-1999 A
1200-1299 B
2000-3159 B
3160-3169 B
3200-3499 C
4900-4949 B
5500-5999 D
8635-8835 E
9105-9119 C
9491-9584 C


Then I have another column that has different flight numbers. I need an if
statement that lets me know which carrier corresponds to each flight number.
For ex in column B I have a flight number 1101. I want to get in column A
what is the carrier (in this ex it would be A).

Can anyone help me with this?

thank you so much!



--
Mercedes