sum of multiple conditional funtions....???

A

amber12177

I am trying to write a code which will sum up several cells while at the same time recognizing if the number is over 6, .75 should be subtracted.

sadly all I've managed is:

D7 10.75

=IF(D7>=6,D7-0.75)

That gives me an answer of 10 which is correct,
but when the value drops below 6 it just says false (i need it to keep the value)

Also, I need a formula that will result in a single answer for multiple cells

so =sum(if(A1>=6, A1-.75) + (A2>=6, A2-.75).... etc...
 
B

bojan0810

you need to write what will happen if d7 is less then 6

So if you have formula like you said =IF(D7>=6,D7-0.75) then you need to write

=IF(D7>=6,D7-0.75,"formula what will happen in d7 is less then 6)

So if you need to keep value of that, formula will be
=IF(D7>=6,D7-0.75,D7)

And formula for all summing where you have that cells you can write like this.

=SUMIF(E7:E16,">=6")

E7:E16 is range of formulas before
 
C

Claus Busch

Hi Amber,

Am Mon, 2 Jun 2014 23:29:25 -0700 (PDT) schrieb (e-mail address removed):
=IF(D7>=6,D7-0.75)

if I understood you correctly try:
=SUMPRODUCT(--(D7:D15>=6),(D7:D15-0.75))


Regards
Claus B.
 
J

joeu2004

I am trying to write a code which will sum up several cells
while at the same time recognizing if the number is over 6,
.75 should be subtracted. sadly all I've managed is: [....]
=IF(D7>=6,D7-0.75)

Perhaps this:

=D7 - 0.75*(D7>=6)


Also, I need a formula that will result in a single answer
for multiple cells
=sum(if(A1>=6, A1-.75) + (A2>=6, A2-.75).... etc...

Perhaps this:

=SUM(A1:A100) - 0.75*COUNTIF(A1:A100,">=6")
 
A

amber12177

so I still haven't figured it out, the info ya'll have offered is great, my problem however is this....(i sould have been more specific
the first time)

so here's an example:

A B C D E F G H
NAMES SCHEDULE DAILY HRS SCHEDULE DAILY HRS SCHEDULE DAILY HRS TOTAL HRS-LUNCH


what i need the formula to do is take each daily hrs cell (c,e,g) if a cell is 6 or over it should subtract .75 but if it is under 6 leave the value as is,...then it needs to add all values into cell H

so far I'm not really having any luck......
any advice would be greatly appreciated!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top