Adding a Formula to all Cells

dubczech

Board Regular
Joined
Apr 29, 2008
Messages
52
So i'm putting together a model for two situations that are combined.

Knowing how management is, they are going to want to separate these situations and look at them individually as well as together. I have decided to program a simple trigger for this analysis, but was hoping there was a simple way to make this trigger flow.

So i've got a basic income statement, and each of the line items flow into it as such:

=Sum('Situation 1:Situation 2'C$12)

Situation 1 and Situation 2 are separate worksheets that are placed next to each other.

Is there a way to add an IF..Then statement to every cell in both Situation 1 & Situation 2 (without typing them manually) to make the trigger work?

Thanks
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
If I understand correctly, you want something like the following. Three sheets each with income statements for Situation 1, Situation 2 & Summary of both. The way I would do this would be to enter your detail into the separate situations. Then, assuming that the account Names are the same on all sheets you can add the following formula and copy down. (I am assuming that Account names are in column A and amounts are in column B).

=VLOOKUP(A1,Sheet2!$A$1:$B$56,2,FALSE)+VLOOKUP(A1,Sheet1!$A$1:$B$56,2,FALSE)

Please note that this will give an error if the list of accounts on your income statements differs on any of the sheets.

If you are expecting to have different accounts listed on different sheets, this should work:

=IF(ISERROR(VLOOKUP(A1,Sheet2!$A$1:$B$56,2,FALSE)),0,VLOOKUP(A1,Sheet2!$A$1:$B$56,2,FALSE))+IF(ISERROR(VLOOKUP(A1,Sheet1!$A$1:$B$56,2,FALSE)),0,VLOOKUP(A1,Sheet1!$A$1:$B$56,2,FALSE))

Cheers, :)
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,582
Messages
6,179,670
Members
452,936
Latest member
anamikabhargaw

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