stueybaby17
24-02-2008 13:05:40
I'm trying to use an If formula but I'm having some trouble. I have three numbers and what I need the formula to do is to take the highest number and the middle number and subtract the middle number to leave me the difference.
Here's a shitty example of what I mean
Given Numbers 1 2 3
What I want the formula to do 0 0 1
Totals 1 2 2
And I had formulas to do that from just the "Given Numbers" column, but then the problem came because the given numbers weren't actually given but calculated using a formula. So when I changed a cell linked to the formula the highest number wasnt' necessarily the highest number anymore.
I was working on the formula like this
=IF(B9<C9,-(B9-C9),0)
But I don't know how to incorporate the third column into the formula.
Any help would be greatly appreciated
hehehhehe
24-02-2008 15:08:07
I'm not exactly sure how you have the cells and formulas laid out, but if you want the highest number out of three cells you can use
=MAX(cell1,cell2,cell3)
For the middle number
=MEDIAN(cell1,cell2,cell3)
And subtract the value given in the second formula from the first.
Like I said though, it's hard to help any better because it's not clear how you have everything laid out.
stueybaby17
24-02-2008 16:03:11
[quote2ecafd0cdc="hehehhehe"]I'm not exactly sure how you have the cells and formulas laid out, but if you want the highest number out of three cells you can use
=MAX(cell1,cell2,cell3)
For the middle number
=MEDIAN(cell1,cell2,cell3)
And subtract the value given in the second formula from the first.
Like I said though, it's hard to help any better because it's not clear how you have everything laid out.[/quote2ecafd0cdc]
The answer you gave didn't quite do what I wanted to do. But you definatly gave the the idea to for how to make it work how I wanted it to. This is what I finally came up with.
=IF(B10=MIN($B$10,$C$10,$D$10),-MIN($B$10,$C$10,$D$10)+MEDIAN($B$10,$C$10,$D$10),0)
And I also realized I was working with capital accounts and everthing is written as a negative number so I needed min.
Thanks
+Karma X2