Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Logical functions

Dear
i m using excel logical functions for some calculation,
eg
=IF(AND(C2="EBRK",K2=1),0.0001,IF(AND(C2="EBRK",K2 1),J2/K2,IF(AND(F21,E21),0.0001,IF(AND(J2<-2000),0.0001,IF(AND(E2100000),1,IF(AND(K2=10000), 3,IF(AND(F21),2,(J2/K2)*4)))))))
but now i want to add some more logic but excel not allowes me.

plz tell me how i can add or simplyfy my formula
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 98
Default Logical functions

you cannot use more then 8 if conditions in excel.
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,345
Default Logical functions

Hiw many more conditions do you want to add? If just one more condition you
can combine two of your consecutive conditions that return the same value
Vis:

IF(AND(F21,E21),0.0001,IF(AND(J2<-2000),0.0001

into:

OR(AND(F21,E21),J2<-2000),0.0001

to give:

=IF(AND(C2="EBRK",K2=1),0.0001,IF(AND(C2="EBRK",K2 1),J2/K2,IF(OR(AND(F21,E21),J2<-2000),0.0001,IF(E2100000,1,IF(K2=10000,3,IF(F21, 2,IF(A1=100,100,J2/K2*4)))))))

which allows you to add another condition at the end, [ie the IF(A1=100]
Note that you don't need all the AND() that you were using.

If the order is not critical then you can add both the conditions in the
OR() to the first condition to give:

=IF(OR(AND(C2="EBRK",K2=1),AND(F21,E21),J2<-2000),0.0001,IF(AND(C2="EBRK",K21),J2/K2,IF(E2100000,1,IF(K2=10000,3,IF(F21,2,IF(A1=10 0,100,IF(A1=200,200,J2/K2*4)))))))

Which allows you to add yet another condition, the IF(A1=200

Failing that you may be able to use a combination of MAX() or MIN() with
CHOOSE().

From the variety of conditions it looks to me as if it would be very easy to
get unexpected results depending on how your spreadsheet is laid out.


--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings


Replace @mailinator.com with @tiscali.co.uk


"Anil_Indian" wrote in message
...
Dear
i m using excel logical functions for some calculation,
eg
=IF(AND(C2="EBRK",K2=1),0.0001,IF(AND(C2="EBRK",K2 1),J2/K2,IF(AND(F21,E21),0.0001,IF(AND(J2<-2000),0.0001,IF(AND(E2100000),1,IF(AND(K2=10000), 3,IF(AND(F21),2,(J2/K2)*4)))))))
but now i want to add some more logic but excel not allowes me.

plz tell me how i can add or simplyfy my formula



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
Logical Functions saltnsnails Excel Discussion (Misc queries) 5 February 19th 08 05:57 PM
using logical functions civilized_engr Excel Worksheet Functions 3 June 10th 06 05:41 PM
logical functions wiz546 Excel Worksheet Functions 1 February 1st 05 03:02 AM
Logical Functions FRN Excel Programming 1 November 4th 03 05:29 PM
Logical Functions FRN[_2_] Excel Programming 1 November 4th 03 04:18 PM


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