Share via

simple IF statement for positive/negative #s

Anonymous
2011-02-01T16:03:51+00:00

Hello,

I want to create a simple if statement to test a specific cell. If the number is A1 is negative then *-1, if its positive leave it alone as it is. How would I go about doing this?

Thanks,

EA

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-02-01T16:06:00+00:00

Hi,

Try this

=ABS(A1)


If this post answers your question, please mark it as the Answer.

Mike H

Was this answer helpful?

40+ people found this answer helpful.
0 comments No comments

4 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-02-01T16:11:24+00:00

    Hi,

    =if(A1<0,A1*-1,A1)

    Was this answer helpful?

    30+ people found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-09-19T05:00:48+00:00

    hello to all

    i need some help on formulation as above :

    design target  design actual  costing target   costing actual   mkt target     mkt actual

    05-04-2016      06-04-2016     07-04-2016        09-04-2016      11-04-2016  12-04-2016

    as per target and actual days for all delay days calculated in seperate column and if delay of days it will be added in next dept target date as per previous.

    if days are in plus i.e. 1,2,3 then it will added smoothly but if any depatment completed his/her target before target date then days are in miuns i.e. -1,-2 so how for next department date is calculated if -1 or any value i.e. in -.

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-02-01T16:25:52+00:00

    Thanks, ABS and =if(A1<0,A1*-1,A1) both works, ABS is easier.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-02-01T16:11:21+00:00

    Hello,

    I want to create a simple if statement to test a specific cell. If the number is A1 is negative then *-1, if its positive leave it alone as it is. How would I go about doing this?

    Thanks,

    EA

    In other words, you want all the numbers to be positive?

    Try this...

    A1 = some number, could be positive or negative

    Enter this formula in B1:

    =ABS(A1)

    --

    Biff

    Microsoft Excel MVP

    Was this answer helpful?

    0 comments No comments