How to find multiple identical cells & add values contained in their rows

emmi

New Member
Joined
Apr 5, 2011
Messages
1
I'm trying to find a way to record spend against a cost centres. I have a workbook with several worksheets. One has a list of all transactions against all cost centres. On another I have a list of all cost centres & I need to show the actual expenditure against the forecast expenditure by tracking the actual spend on the first worksheet.

I need to make the process of doing this as simple as possible for the user, so I am thinking that linking a macro to a button is the best thing for the user. I need that macro therefore to find cells containing the same cost centre in one worksheet, add up the spend values in those rows, and set those values against the cost centre forecast in the second worksheet.

Hope this makes sense...

Can anyone help me? I am quite new to all this stuff & would be very grateful!

Thanks in advance,

emmi
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Have you considered using a SUMIF function in a formula?

On Sheet2, this formula will match all the cells on Sheet1:Column A that equal Sheet2:A1 and add the corresponding values from Sheet1:ColumnB

=SUMIF(Sheet1!A:A, A1, Sheet1!B:B)
 
Upvote 0

Forum statistics

Threads
1,224,616
Messages
6,179,911
Members
452,949
Latest member
beartooth91

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