VBA to match and sum

Gregm66

Board Regular
Joined
Jan 23, 2016
Messages
170
Hi everyone,
I have been trying to sort this out myself but with no luck.
I have 2 worksheets, 1 is called "Club Ledger" the other is called "Financial Summary"

Worksheet "Club Ledger" has 4 columns, Column "A" is the Date, Column "B" is Description, Column "C" is Credits & column "D" is Debits, Columns "C" & "D" are dollar values.
Column "B" can have entrys like: Member Fees, Recycling, Raffles ect, these can appear many times during the course of the year.

Worksheet "Financial Summary" has 3 columns, Column "D" has Description IE: Members Fees ect, Columns "E" & "F" are dollar values, at present i add all the items manually from the "Club Ledger" worksheet as you can imagine this is very time consuming. then put those total values into the "Financial Summary" worksheet.

Is there a way using VBA to match all entrys in the "Club Ledger" worksheet say "Members Fees" or "Recycling" then look at column "C" which holds the dollar values and sum all of those matching values to Column "E" or "F" of the "Financial Summary" worksheet.

here is the tricky part, "Financial Summary" worksheet has 5 rows starting at row 7 and going to row 11, each one has either Members Fees or Recycling ect in it and these are for Income only.
Rows 15 to 20 are for Expenses only so they can have Stationary, Shopping, Party Supplies, Petty Cash ect.

so the vba needs to search for the matching entrys then sum all the entrys that match that entry.

I hope this is easy to understand.
Thanks in advance for any help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Hi all,
I managed to solve it without using vba.
see below
VBA Code:
=SUMIFS($C$5:$C$105001,$A$5:$A$105001,">="&F15,$A$5:$A$105001,"<="&EOMONTH(J15,0),$B$5:$B$105001,G15)
 
Upvote 0

Forum statistics

Threads
1,214,932
Messages
6,122,334
Members
449,077
Latest member
Jocksteriom

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