Convert Positive to negative and vice versa

DIPASGL

New Member
Joined
Oct 26, 2022
Messages
39
Office Version
  1. 2003 or older
Platform
  1. Windows
Hi

Please help me with below - thanks heaps
1 HIJKLMNO
2 Currency CodeGen Posting TypeGen Bus. P..Gen. Prod.GSTBus. P... Branch CodeAmountGST Amount
3SaleGENGENCUSTOMER125-14,427.68-1,311.61
4SaleGENGENCUSTOMER125
51252,240.600
612512,445.380
7SaleGENGENCUSTOMER125-3.71-0.34
8
9 Till Variance 3.71Tax$1,311.27
Queries Below
If i9 is positive then n7 should show negative
If i9 is negative then n7 should show positive
If n7 is negative then n3 should be tax L9 less N7 and multiply with 11 , After this calculation N3 shd still show have negative sign
If n7 is positive then n3 should be tax L9 plus 3.71 and multiply with 11 , After this calculation N3 shd still show have negative sign
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
I don't get the same result testing with the data and it's a bit difficult without a XL2BB table.

You may try ABS() or SIGN() function, which works regardless or depending on the positivity/negativity of the number.
 
Upvote 0
I don't get the same result testing with the data and it's a bit difficult without a XL2BB table.

You may try ABS() or SIGN() function, which works regardless or depending on the positivity/negativity of the number.
I tried but its not giving me correct result.
 
Upvote 0
Hi, see if this works
Book1
HIJKLMNO
11 HIJKLMNO
22 Currency CodeGen Posting TypeGen Bus. P..Gen. Prod.GSTBus. P...Branch CodeAmountGST Amount
33SaleGENGENCUSTOMER125-14,427.68-1,311.61
44SaleGENGENCUSTOMER125
551252,240.600
6612512,445.380
77SaleGENGENCUSTOMER125-3.71-0.34
88
99 Till Variance3.71Tax$1,311.27
Sheet1
Cell Formulas
RangeFormula
N3N3=-L9*11-ABS(N7)
N7N7=-I9
 
Upvote 0
Thanks for reply but my query was - My excel file recognise the cell is in positive and change to negative or vice versa. Currently I need to do myself this. Also if it is positive then this formula itself change from plus to minus or vice versa.Thanks
=-L9*11-ABS(N7)
 
Upvote 0
Try

Book1
GHIJKLMNOP
11 HIJKLMNO
22 Currency CodeGen Posting TypeGen Bus. P..Gen. Prod.GSTBus. P...Branch CodeAmountGST Amount
33SaleGENGENCUSTOMER125-14,464.78-1,311.61
44SaleGENGENCUSTOMER125
551252,240.600
6612512,445.380
77SaleGENGENCUSTOMER125-3.71-0.34
88
99 Till Variance3.71Tax$1,311.27
10
11
12
13
14
15
Sheet3
Cell Formulas
RangeFormula
N3N3=-IF(N7<0,(L9-N7)*11,(L9+N7)*11)
N7N7=I9*-1
 
Upvote 0
Thanks @Sufiyan,

It worked N3 but still for n7 , I HAVE TO remember that if variance is positive then multiply * -1 and I variance is negative then multiply I9 *1.
I want if I9 is positive then N7 should show with negative. Similarly
I want if I9 is negative then N7 should show with positive.
Thanks
 
Upvote 0
It worked N3 but still for n7 , I HAVE TO remember that if variance is positive then multiply * -1 and I variance is negative then multiply I9 *1.
I want if I9 is positive then N7 should show with negative. Similarly
I want if I9 is negative then N7 should show with positive.
Thanks

I think that is what it does unless you want something else.

Book1
GHIJKLMNOP
11 HIJKLMNO
22 Currency CodeGen Posting TypeGen Bus. P..Gen. Prod.GSTBus. P...Branch CodeAmountGST Amount
33SaleGENGENCUSTOMER125-14,464.78-1,311.61
44SaleGENGENCUSTOMER125
551252,240.600
6612512,445.380
77SaleGENGENCUSTOMER125-3.71-0.34
883.71
99 Till Variance3.71Tax$1,311.27
10-3.71
11
12
13
14
15
Sheet3
Cell Formulas
RangeFormula
N3N3=-IF(N7<0,(L9-N7)*11,(L9+N7)*11)
N7:N8N7=I9*-1
 
Upvote 0
Sorry asking again but when N7 is negative then your formula works but when I get negative N7 , then I am still getting same result, When n7 is plus means its greater then zero so N3 should less o8 like (1311.27-0.34)*11 .
Thanks
 
Upvote 0
Sorry asking again but when N7 is negative then your formula works but when I get negative N7 , then I am still getting same result, When n7 is plus means its greater then zero so N3 should less o8 like (1311.27-0.34)*11 .
Thanks

So what you want as result if N7 is positive

N3 should be negative or positive?

See if that is what you want

Book1
GHIJKLMNOP
11 HIJKLMNO
22 Currency CodeGen Posting TypeGen Bus. P..Gen. Prod.GSTBus. P...Branch CodeAmountGST Amount
33SaleGENGENCUSTOMER12514,464.78-1,311.61
44SaleGENGENCUSTOMER125
551252,240.600
6612512,445.380
77SaleGENGENCUSTOMER125-3.71-0.34
883.71
99 Till Variance3.71Tax$1,311.27
10-3.71
11
12
13
14
Sheet3
Cell Formulas
RangeFormula
N3N3=SIGN(-N7)*IF(N7<0,(L9-N7)*11,(L9+N7)*11)
N7:N8N7=I9*-1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,959
Members
449,096
Latest member
Anshu121

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top