English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have the following formulas:
=IF(AND(500<=C5,C5<=1000),D5*0.03+433.7,B5)
=IF(AND(1000<=C5,C5<=1500),D5*0.05+433.7,B5)
=IF(AND(1000<=C5,C5<=1500),D5*0.07+433.7,B5)
how do I get them to become one in excel?

2007-02-08 01:31:35 · 4 answers · asked by Ann 1 in Science & Mathematics Mathematics

the formulas are:
=IF(AND(500<=C5,C5<=1000),D5*
0.03+433.7,B5)
=IF(AND(1000<=C5,C5<=1500),D5*
0.05+433.7,B5)
=IF(1500=>C5,D5*0.07+433.7,B5)

2007-02-08 01:36:02 · update #1

4 answers

Two ways,

Logically the IF function contains three sections
IF (condition, true, false)
so you can embed them within each other putting each if statement as the false part of the failes previous if
if(and(500<=c5,c5<=1000),d5*0......,if(and etc )))))))

Mathematically, because excel returns true as 1 and false as zero you can calculate
=d5*0.... *if(and(500<=c5,c5<=1000))
+ d5*0....* if(and(1000<=c5,c5<=1500))
+ d5*0.....* if(and(1500<=c5,c5<=2000)) etc

or put the separate functions into hidden cells and sum them

Now you've given us the full formulae it can be written
= ( 0.03*(C5>=500)+0.02*(C5>=1000)+0.02*(C5>=1500) ) *d5*433.7

2007-02-08 01:40:51 · answer #1 · answered by kinvadave 5 · 0 0

First of all, if you combine them, you may get an answer that isn't right since C5 = 1000 or 1500 can be satisfied in two of the conditions.

But they can be embedded as such:

=IF(AND(500<=C5,C5<1000),
D5*0.03+433.7,
IF(AND(1000<=C5,C5<1500),
D5*0.05+433.7,
IF(AND(1500<=C5),
D5*0.07+433.7,B5)))

2007-02-08 09:46:40 · answer #2 · answered by gebobs 6 · 2 0

It looks like the 3rd one should be just
=IF(1500<=C5), D5*...

Also, which line do you want if C5 = 1000? C5 = 1500?

To make the typing easier for me, I will call the stuff inside the AND()'s just #1, #2, and #3

Then this structure should do the job:
=IF(AND(#1), ..., IF(AND(#2), ...., IF(AND(#3), ..., ...)))

2007-02-08 09:41:44 · answer #3 · answered by morningfoxnorth 6 · 0 0

add more (())
the key to that is when you work from the inside out like the single ones will be done first and the other ones will be done second or last depending on how many... I don't know if that is your entire program but that is what I would do...

like =((52/2)/2)

2007-02-08 09:39:33 · answer #4 · answered by De 5 · 0 0

fedest.com, questions and answers