Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Alex McKenzie
 
Posts: n/a
Default multiple if statements

Hi all
Thanks for help in the past

I have in cell A1 either an "L" or an "S"

If cell A1= "L" then I require the following formula
(which refers to other cells)
in cell A2

=IF(D9<E10,1,IF(D9<E11,2,IF(D9E11,3)))

but if cell A1="S" then I need a slightly different
formula

=IF(D9E10,1,IF D9E11,2,IF D9<E11,3)))

in cell A2

Many thanks in advance

Alex


  #2   Report Post  
Posted to microsoft.public.excel.misc
Bryan Hessey
 
Posts: n/a
Default multiple if statements


Allowing for D9=E10=E11, try

=IF(A1="S",IF(D9<E10,1,IF(D9<E11,2,IF(D9E11,3,"eq "))),IF(A1="L",IF(D9E10,1,IF(D9E11,2,IF(D9<E11,3 ,"eq")))))


\\Alex McKenzie Wrote:
Hi all
Thanks for help in the past

I have in cell A1 either an "L" or an "S"

If cell A1= "L" then I require the following formula
(which refers to other cells)
in cell A2

=IF(D9<E10,1,IF(D9<E11,2,IF(D9E11,3)))

but if cell A1="S" then I need a slightly different
formula

=IF(D9E10,1,IF D9E11,2,IF D9<E11,3)))

in cell A2

Many thanks in advance

Alex



--
Bryan Hessey
------------------------------------------------------------------------
Bryan Hessey's Profile: http://www.excelforum.com/member.php...o&userid=21059
View this thread: http://www.excelforum.com/showthread...hreadid=486766

  #3   Report Post  
Posted to microsoft.public.excel.misc
paul
 
Posts: n/a
Default multiple if statements

=IF(AND(A1="L",D9<E10),1,IF(AND(A1="L",D9<E11),2,I F(AND(A1="L",D9E11),3,IF(AND(A1="S",D9E10),1,IF( AND(A1="S",D9E11),2,IF(AND(A1="S",D9<E11),3,))))) )
some of your conditions arent exclusive.....i think these will only work if
there are numbers in d9 and e10 or in d9 and e11.However i hope this helps.I
cant help thinking there may be a more elegant way.
--
paul
remove nospam for email addy!



"Alex McKenzie" wrote:

Hi all
Thanks for help in the past

I have in cell A1 either an "L" or an "S"

If cell A1= "L" then I require the following formula
(which refers to other cells)
in cell A2

=IF(D9<E10,1,IF(D9<E11,2,IF(D9E11,3)))

but if cell A1="S" then I need a slightly different
formula

=IF(D9E10,1,IF D9E11,2,IF D9<E11,3)))

in cell A2

Many thanks in advance

Alex



  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips
 
Posts: n/a
Default multiple if statements

=IF(OR(AND(D9<E10,A1="L"),AND(D9E10,A1="S")),1,IF (OR(AND(D9<E11,A1="L"),AND
(D9E11,A1="S")),2,IF(OR(AND(D9E11,A1="L"),AND(D9 <E11,A1="S")),3)))


--

HTH

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


"Alex McKenzie" wrote in message
...
Hi all
Thanks for help in the past

I have in cell A1 either an "L" or an "S"

If cell A1= "L" then I require the following formula
(which refers to other cells)
in cell A2

=IF(D9<E10,1,IF(D9<E11,2,IF(D9E11,3)))

but if cell A1="S" then I need a slightly different
formula

=IF(D9E10,1,IF D9E11,2,IF D9<E11,3)))

in cell A2

Many thanks in advance

Alex




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
how do I make multiple "if" statements AccessNewbie New Users to Excel 3 October 6th 05 12:18 AM
Multiple If Statements excelrookie05 Excel Worksheet Functions 2 September 14th 05 02:19 PM
multiple if statements ddepasquale Excel Worksheet Functions 3 August 5th 05 09:55 PM
How to: Multiple "if" statements? Hosh New Users to Excel 2 June 29th 05 02:20 PM
Combining IF and multiple SUMIF statements, if A>0 & B is between Lee Excel Worksheet Functions 1 January 3rd 05 06:46 PM


All times are GMT +1. The time now is 11:50 PM.

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"