Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
TC TC is offline
external usenet poster
 
Posts: 5
Default Zero displayed in place of negative values

Hi

I've been struggling with a couple of formulae, but am not sure if I am
going down the right route.

The first is

If value A-B is positive, return as normal. If value A-B is negative, return
zero

(Is there a simple function for this - rather than write it into a formula
?)

The second is this:

If value is = A and =< B multiply by 2, but if value is B and =<C multiply
by 3

I'm probably just getting the syntax messed up with this one, but any help
would be much appreciated

Thanks

--
Tobit


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Zero displayed in place of negative values

#1.
=max(0,a1-b1)
or
=if(a1b1,a1-b1,0)

#2. Maybe...
=d1*if(and(D1=a1,d1<=b1),2,if(and(d1b1,d1<=c1),3 ,0))

If d1 wasn't between those two limits, then I multiplied by 0.


TC wrote:

Hi

I've been struggling with a couple of formulae, but am not sure if I am
going down the right route.

The first is

If value A-B is positive, return as normal. If value A-B is negative, return
zero

(Is there a simple function for this - rather than write it into a formula
?)

The second is this:

If value is = A and =< B multiply by 2, but if value is B and =<C multiply
by 3

I'm probably just getting the syntax messed up with this one, but any help
would be much appreciated

Thanks

--
Tobit


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,339
Default Zero displayed in place of negative values

First ..

=MAX(0,A-B)

Second ...

=IF
(AND(value=A1,value<=B1),value*2,IF(AND(valueB1, value<=C1),value*3,"whatever you want"))

Change 'value' as required

"TC" wrote:

Hi

I've been struggling with a couple of formulae, but am not sure if I am
going down the right route.

The first is

If value A-B is positive, return as normal. If value A-B is negative, return
zero

(Is there a simple function for this - rather than write it into a formula
?)

The second is this:

If value is = A and =< B multiply by 2, but if value is B and =<C multiply
by 3

I'm probably just getting the syntax messed up with this one, but any help
would be much appreciated

Thanks

--
Tobit



  #4   Report Post  
Posted to microsoft.public.excel.misc
TC TC is offline
external usenet poster
 
Posts: 5
Default Zero displayed in place of negative values

Thanks Guys - works well

--
Tobit


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
negative dates or times are displayed as # # # # Amr Shehata Excel Worksheet Functions 4 February 2nd 07 11:35 AM
negative dates or times are displayed as # # # # Amr Shehata New Users to Excel 3 November 9th 06 12:34 PM
Negative Times Displayed as # # # # AntnyMI Excel Discussion (Misc queries) 1 September 21st 06 04:43 PM
How to place parenthesis around a negative percentage calculation. Kay Excel Worksheet Functions 1 February 3rd 06 07:52 PM
Formula to make Negative Values Positive & Positive Values Negative? mustard Excel Discussion (Misc queries) 4 September 26th 05 10:05 PM


All times are GMT +1. The time now is 08:59 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"