Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Alex
 
Posts: n/a
Default Test for a negative #

I need to test a cell value to determine if is negative or positive. If
negative, the value gets subtracted from partA and added to partB. If
positive, it gets added to partA and subtracted from partB. I've seen a few
posts close to this problem, but not close enough to help me. I'm stumped,
my "if" statements keep running me in circles. I've got plenty of room
offscreen to do this evaluation, but ... .

Thanks!

  #2   Report Post  
Roland
 
Posts: n/a
Default Test for a negative #

I'm going to take a wild guess that the source of your problem is arithmetic
with negative numbers, that when you say you want to subtract the negative
number, what you really mean is subtract the absolute value of the negative
number, and when you say you want to add the value, you mean you want to add
the absolute value of the test value.


"Alex" wrote:

I need to test a cell value to determine if is negative or positive. If
negative, the value gets subtracted from partA and added to partB. If
positive, it gets added to partA and subtracted from partB. I've seen a few
posts close to this problem, but not close enough to help me. I'm stumped,
my "if" statements keep running me in circles. I've got plenty of room
offscreen to do this evaluation, but ... .

Thanks!

  #3   Report Post  
Richard Buttrey
 
Posts: n/a
Default Test for a negative #

On Sat, 22 Oct 2005 15:25:02 -0700, "Alex"
wrote:

I need to test a cell value to determine if is negative or positive. If
negative, the value gets subtracted from partA and added to partB. If
positive, it gets added to partA and subtracted from partB. I've seen a few
posts close to this problem, but not close enough to help me. I'm stumped,
my "if" statements keep running me in circles. I've got plenty of room
offscreen to do this evaluation, but ... .

Thanks!



If(yourcell<0,partB+partA-yourcell,PartB-partA+yourcell)

HTH, if not a specific example would be useful.

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
  #4   Report Post  
Alex
 
Posts: n/a
Default Test for a negative #

Yes the problem is arithmetic, but no I am not looking for the absolute
value. It is a formula with several parts, and the input value is to be
subtracted & added to 2 different parts as I described below. That's what
has me stumped. I could change the input requirement to 2 values, one a + or
-, and the other the value. But I was trying to do it with 1 input value.

"Roland" wrote:

I'm going to take a wild guess that the source of your problem is arithmetic
with negative numbers, that when you say you want to subtract the negative
number, what you really mean is subtract the absolute value of the negative
number, and when you say you want to add the value, you mean you want to add
the absolute value of the test value.


"Alex" wrote:

I need to test a cell value to determine if is negative or positive. If
negative, the value gets subtracted from partA and added to partB. If
positive, it gets added to partA and subtracted from partB. I've seen a few
posts close to this problem, but not close enough to help me. I'm stumped,
my "if" statements keep running me in circles. I've got plenty of room
offscreen to do this evaluation, but ... .

Thanks!

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
Formula to make Negative Values Positive & Positive Values Negative? mustard Excel Discussion (Misc queries) 4 September 26th 05 10:05 PM
irritating warning for negative data on log charts Roger Charts and Charting in Excel 0 September 10th 05 12:04 AM
NPV Calc appears incorrect with a large # of negative cash flows MikeW Excel Worksheet Functions 1 September 1st 05 03:31 PM
Negative Values Only [email protected] Excel Discussion (Misc queries) 1 August 8th 05 08:58 PM
How do I replace a negative number at the end of a formula with a. dealn2 Excel Discussion (Misc queries) 5 December 23rd 04 07:47 PM


All times are GMT +1. The time now is 06:36 PM.

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

About Us

"It's about Microsoft Excel"