excel formula

  • Thread starter Thread starter Brian
  • Start date Start date
B

Brian

Does anyone know how to create a cell that will calculate whether the number
in the orginal cell is above or below 40. If above 40 it will calculate at
$69.00 for anything over if below it will calculate at $46.00.

Thanks in advance
 
You account for anything less than 40 and anything greater than 40 but what
if the value IS 40?

I'll assume you want:

Less than or equal to 40 = 46
Greater than 40 = 69

=IF(COUNT(A1),IF(A1>40,69,46),"")
 
Something like this, I reckon:
In B2, copied down: =IF(A2="","",IF(A2>40,A2*64,A2*46))
Adapt to suit. Any good? hit the YES below
 
=IF(AND(NOT(ISBLANK(A1)),A1<40),46,IF(AND(A1>40,NOT(ISTEXT(A1))),69,0))

Format the result cell as Currency.
 
Dear Valko

Hi.
What is the function of COUNT(A1) in
=IF(COUNT(A1),IF(A1>40,69,46),"")

According to your explanation, it accounts for entries equal to 40, but I
can not figure out "count" functionality in this regard.
Your note is highly appreciated.
 
Back to my previous post, I think I got the answer. "count" checks to see if
the cell is empty or not and leaves the result empty if origin is empty or
not-number and enters second "if" otherwise.

That count usage was nice, but I couldn't understand its relation to equal
part to 40.
 
Yes, you pretty much got it figured out.

COUNT tests that there is in fact only a number entered in the cell. Without
testing for a number it would be possible that if the cell contained a TEXT
entry then:

A1>40 would be TRUE and give an incorrect (or unexpected) result.
 
Back
Top