Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / March 2006

Tip: Looking for answers? Try searching our database.

Conditional functions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy C - 20 Mar 2006 04:16 GMT
=IF(K7=1,
IF(AND(A7=51),M7/1000*$N$2,M7/1000*$O$2),
IF(AND(A7=52),M7/1000*$N$3,M7/1000*$O$3),
IF(AND(A7=53),M7/1000*$N$4,M7/1000*$O$4),
IF(AND(A7=54),M7/1000*$N$5,M7/1000*$O$5))

I have two primary conditions, either a one or two and four secondary
conditions, either 51, 52, 53, or 54.    So if K7 = 1 and A7 = 51 divide
M7/1000 and multiply by O2.   Evidently I have too many iterations for this
to work.  Is there another way to accomplish this?  I am using Office 2000
and 2003.
Thanks,
Ron Rosenfeld - 20 Mar 2006 05:03 GMT
>=IF(K7=1,
>IF(AND(A7=51),M7/1000*$N$2,M7/1000*$O$2),
[quoted text clipped - 8 lines]
>and 2003.
>Thanks,

You may have too many conditions, but your syntax is also incorrect.

=IF(K7=1,
IF(A7=51,M7/1000*O2,
IF(A7=52,M7/1000*O3,
IF(A7=53,M7/1000*O4,
IF(A7=54,M7/1000*O5)))),
IF(K7=2,
IF(A7=51,M7/1000*N2,
IF(A7=52,M7/1000*N3,
IF(A7=53,M7/1000*N4,
IF(A7=54,M7/1000*N5))))))

Not sure what you want to do if K7 is not 1 or 2 and/or A7 not 51-54, but you
may be able to adapt the above (which gives a FALSE result if your entries are
out of range).

--ron
Max - 20 Mar 2006 05:17 GMT
One way ...

Put in M2:M5 the numbers: 51, 52, 53, 54

Then we could use:

=IF(K7=1,IF(ISNA(MATCH(A7,$M$2:$M$5,0)),M7/1000*VLOOKUP(A7,$M$2:$O$5,3,0),M7
/1000*VLOOKUP(A7,$M$2:$O$5,2,0)),"")

Have presumed that nothing, i.e. blanks: ""
to be returned if K7 <>1 (this is not specified by you)

Adapt to suit
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
> =IF(K7=1,
> IF(AND(A7=51),M7/1000*$N$2,M7/1000*$O$2),
[quoted text clipped - 8 lines]
> and 2003.
> Thanks,
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.