keep the results as positive numbers

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am subtracting the actual daily high from the predicted daily high
temperature.

My formula is this:
=H2-B2

However, I want my results to always be positive numbers. I feel like there
should be a simple mathematical answer, but I didn't pay attention very well
at school.

Thanks.
 
Try something like this:

=ABS(H2-B2)

Or...maybe
=MAX(H2-B2)-MIN(H2-B2)

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
You're very welcome, Raza....and thanks for the feedback!

by the way...
my 2nd formula should have been
=MAX(H2:B2)-MIN(H2:B2)

instead of
=MAX(H2-B2)-MIN(H2-B2)

(I forgot to replace minus signs when I copied your formula)
***********
Regards,
Ron

XL2002, WinXP
 
my 2nd formula should have been
=MAX(H2:B2)-MIN(H2:B2)

I hate to tell you this, Ron, but your revised formula is still wrong. You
want

=MAX(H2,B2)-MIN(H2,B2)

Comas, not colons.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)
 
Ya know, Chip.....if I drank, I'd have an excuse...but, I don't.

Thanks for catching that.

***********
Best Regards,
Ron

XL2002, WinXP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top