# Thread: What is wrong with this formula?

1. Registered User
Join Date
Sep 2006
Posts
4

## Unanswered: What is wrong with this formula?

=IF((AJ6+8)>480,480),SUMIF(AJ6+8)<480

For clarification I want it to add AJ6 + 8. If the total is greater than 480 then 480 remains unchanged and can only be subtracted from.

2. Registered User
Join Date
Oct 2003
Posts
1,091
Howdy.

Your sentence is incomplete. What do you mean by "can only be subtracted from"?

3. Registered User
Join Date
Apr 2004
Location
Derbyshire, UK
Posts
802
Hi tinalma

There is plenty wrong with the fomula and, as shades indicated, you requirment is eve less clear.

Are you trying to do this

=IF((AJ6+8)>=480,480,(AJ6+8)) ??

If not then what ??

MTB

4. Registered User
Join Date
Dec 2004
Posts
37

## I don't think you can use a formula?

For totals upto 480 then give the total

For totals over 480, if the next number in the sum tips it over 480 then still show 480. Then at the next number start counting backwards from 480.

This will need a User Function since the formula doesn't know how many terms are in the sum and at what point the total will be 480.

Unless someone knows different, but it would be one hell of a formula.

If I have some time to spend I will try and get a User Function sorted for you, or someone might beat me to it?

Mike

5. Registered User
Join Date
Apr 2004
Location
Derbyshire, UK
Posts
802
Hi again

Is this what you are trying to do

=IF(AJ6+8<=480,AJ6+8,IF(AJ6+8>488,480*2-AJ6,480))

??

MTB

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•