Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default 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



  #6   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 303
Default 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



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default 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



  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default 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




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default 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






  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 45
Default 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



  #12   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 418
Default 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.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display negative $ amount?? Soundar Excel Discussion (Misc queries) 12 January 3rd 08 04:51 PM
how do i reflect a negative amount in brackets in excel? Rachel Excel Discussion (Misc queries) 4 August 20th 07 04:23 PM
ENTER NEGATIVE AMOUNT Anna Excel Discussion (Misc queries) 3 October 27th 06 10:53 AM
Change negative amount to positive. George New Users to Excel 2 July 29th 05 05:59 PM
How do I enter a negative dollar amount? CML Excel Discussion (Misc queries) 7 February 6th 05 11:19 PM


All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"