![]() |
Formula with negative amount
I have a formula that currently reads like this
=IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
Maybe...
=if(min(c45,c47)<0,min(c45,c47),max(c45,c47)) Roxy wrote: I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy -- Dave Peterson |
Formula with negative amount
Maybe this
=IF(OR(C45<0,C47<0),MIN(C45,C47),MAX(C45,C47)) Mike "Roxy" wrote: I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
Please give an example of the values you have and wish to see.
Vaya con Dios, Chuck, CABGx3 "Roxy" wrote: I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
=IF(C45<0,C45,IF(C47<0,C47,IF(C45C47,C45,C47)))
-- Greetings from New Zealand "Roxy" wrote in message ... I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
=IF(C45<0,C45,IF(C47<0,C47,MAX(C45,C47)))
-- David Biddulph "Roxy" wrote in message ... I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
This works thank you!
~Roxy "Dave Peterson" wrote: Maybe... =if(min(c45,c47)<0,min(c45,c47),max(c45,c47)) Roxy wrote: I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy -- Dave Peterson |
Formula with negative amount
This one works too, thank you!
~Roxy "Mike H" wrote: Maybe this =IF(OR(C45<0,C47<0),MIN(C45,C47),MAX(C45,C47)) Mike "Roxy" wrote: I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
These are all good, but now I have another problem. IF C47 is greater then
C45 then it still only is pulling the amt from C45??? Any ideas? Thanks everyone!! Roxy "David Biddulph" wrote: =IF(C45<0,C45,IF(C47<0,C47,MAX(C45,C47))) -- David Biddulph "Roxy" wrote in message ... I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
Roxy,
A quick scan though all the solutions shows that everyones formula returns the max of C45 & C47 if they are both positive and the minimum of thos cells iif either or both are negative so Im confused. Please provide what answer you expect to the options C45 C47 1 2= 2 1= -1 1= 1 -1= -1 -1= -1 -2= -2 -1= Mike "Roxy" wrote: These are all good, but now I have another problem. IF C47 is greater then C45 then it still only is pulling the amt from C45??? Any ideas? Thanks everyone!! Roxy "David Biddulph" wrote: =IF(C45<0,C45,IF(C47<0,C47,MAX(C45,C47))) -- David Biddulph "Roxy" wrote in message ... I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
I was just told I am good to go with the way you have shown me. No need to
worry about any thing else. So thank you so very much. Sorry for any extra confusion. :) ~Roxy "Mike H" wrote: Roxy, A quick scan though all the solutions shows that everyones formula returns the max of C45 & C47 if they are both positive and the minimum of thos cells iif either or both are negative so Im confused. Please provide what answer you expect to the options C45 C47 1 2= 2 1= -1 1= 1 -1= -1 -1= -1 -2= -2 -1= Mike "Roxy" wrote: These are all good, but now I have another problem. IF C47 is greater then C45 then it still only is pulling the amt from C45??? Any ideas? Thanks everyone!! Roxy "David Biddulph" wrote: =IF(C45<0,C45,IF(C47<0,C47,MAX(C45,C47))) -- David Biddulph "Roxy" wrote in message ... I have a formula that currently reads like this =IF(C45C47,C45,C47) I want to now be able to have it include the fact that either one of the cells could be a negative amount and pull that number. Would that be possible? Thank you in advance for any help. Roxy |
Formula with negative amount
"Roxy" wrote:
These are all good, but now I have another problem. IF C47 is greater then C45 then it still only is pulling the amt from C45??? Any ideas? Based on the fact that you were basically pleased with Dave's solution (and others that were similar) and on the fact that your original formula did not do what you want, I presume that if the sign of both values is the same, you want the larger __magnitude__. For example, -45 is larger than -40 in magnitude, even though -45 is less than -40; and 45 is larger than 40 in magnitude). What is unclear is: which do you want if one cell has -45 and the other has 40? If you want -45 in that case, then you always want the larger in magnitude, regardless of sign. One solution: =if(abs(C45) abs(C47), C45, C47) If you want 40 in that case, then you only want the smaller negative number (larger in magnitude) when both numbers are negative. One solution: =if(max(C45,C47)<0, min(C45,C47), max(C45,C47)) Try the appropriate solution with the following combinations: -45 40 -40 45 -45 -40 45 40 If you do not like all of the results, please post back with __all__ of the expected results, not just the ones you don't like. |
All times are GMT +1. The time now is 09:05 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com