Two formulas in one cell that subtract from each other?

danbilon

New Member
Joined
Jan 7, 2018
Messages
1
Hello All,

I am trying to figure out a formula for the following:

I have three tabs in an excel workbook for an accounting project: "Variance," "Actual", and "budget."

Each tab has a unique GL# in column A followed by dollar amounts in the next columns representing the month. All the tabs have the same GL#s.

In the variance tab, I want to put a formula. I want each cell next to the GL# to extract the amount from the "Actual" tab that contains the same GL, I also want to extract the amount from the "Budget" tab into the same cell. I want the extracted amount from Actual tab to subtract the amount extracted from the Budget tab.

I tried SUMIF but it can only extract me information from one tab. I need to do something like two SUMIF formulas that can also subtract one from the other.

Any ideas?

Thanks,
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Something like this?

I created the 3 sheets as described, the 3 sheets are identical with GL# in column A. This formula would be inserted in column B on the Main Sheet.

Code:
=SUM(SUMIF(Actual!A:A,Variance!A2,Actual!B:B)-SUMIF(Budget!A:A,Variance!A2,Budget!B:B))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,869
Messages
6,127,414
Members
449,382
Latest member
DonnaRisso

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