Column Subtraction

sadath

Active Member
Joined
Oct 10, 2004
Messages
267
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to put a custom column by subtracting Value1 from Value2, Subtraction column is the result i got from PQ
Store3 result should be -21 (null-21) & Store 5 result should be 54 (54-null). How can get the correct result

Store Value1 Value2 Subtraction
Store 1 1700 3544 1844
Store 2 6464 2432 -4032
Store 3 21
Store 4 64 312 248
Store 5 54
Store 6 213
Store 7 654 1231 577
Store 8 56 2 -54
Store 9 3
Store 10 564 312 -252
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Hi sady,
Hope your doing good!

if your look for Formula to do that please try with this formula "=IF((C3-B3)>0,(C3-B3),ABS((C3-B3))&" - null")"

Thanks!
LET
 
Upvote 0
Hi
I wrote in my thread, its PQ (Power Query) not excel formula. And this section is only for Power BI

any one have the answer
 
Upvote 0
Nulls aren't the same as 0. A + null = null, a - null = null etc etc

Duplicated your columns for value 1 and value 2. Replace values null --> 0 and then do the subtraction. Delete the two helper columns.
 
Upvote 0

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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