VBA – Repeat SUMIFS Formula for Unique Combinations of Rows

Status
Not open for further replies.

msmna93

New Member
Joined
Dec 31, 2018
Messages
2
Hello everyone.

I am a VBA beginner. I need your help to solve my problem.

Suppose that I have an Excel table with the following fields:

D: Account
L: Amount
M: Category
N: Value Day

What I need to do is the following:


  1. Compute the conditional sums of the amounts by all possible unique combinations of accounts, categories and value days that are shown in the table until the Last Row.
  2. Store the values coming from point 1 in a 3D array (without printing them in an Excel sheet)

Here is the code where I'd need to build on.

Dim LastRow As Long
LastRow = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row

Application.WorksheetFunction.Sumifs(Range("L2:L" & LastRow), Range("D2:D" & LastRow), "IBAN N.1", Range("M2:M" & LastRow), "Foreign Receipt", Range("N2:N" & LastRow), "27")

Any help is deeply appreciated.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Status
Not open for further replies.

Forum statistics

Threads
1,224,816
Messages
6,181,143
Members
453,021
Latest member
Justyna P

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