Embed a list range into a sumifs formula

edmundmckay

New Member
Joined
Aug 24, 2015
Messages
31
Hello

I am using the below formula to generate TB table gathering the sum amount from a general ledger within a year end date range against each chart code (column A in image below). There are transaction codes which can be ignored within the GL and the codes in in columns I-N in the image below ("OBJS", "JADJS", "OCS", "DOBS", "DCLP", "DIRES") are to be included. I only know how to get the information using the below formula. Therefore having to to create 6 columns of result cells (columns R-W) and use 6 columns of criteria columns with the individual codes (columns I-N).

Please could someone tell me how to get rid of the columns and embed the list of the codes ("OBJS", "JADJS", "OCS", "DOBS", "DCLP", "DIRES") into the formula in order for me to only use one column to return the amount for the date range.

On the GL sheet column J is the amount column , column F is the chart code column, Column A is the account date, Column M is the transaction code column.

=SUMIFS('GL Trans at 29.08.2017'!$J:$J,'GL Trans at 29.08.2017'!$F:$F,$A10,'GL Trans at 29.08.2017'!$M:$M,$I10,'GL Trans at 29.08.2017'!$AJ:$AJ,">="&R$6,'GL Trans at 29.08.2017'!$AJ:$AJ,"<="&R$8)


EfKbAY.jpg


kind regards

Edmund
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Re: How to embed a list range into a sumifs formula

Hi, you can try like this:

Code:
=SUM(SUMIFS('GL Trans at 29.08.2017'!$J:$J,'GL Trans at 29.08.2017'!$F:$F,$A10,'GL Trans at 29.08.2017'!$M:$M,{"OBJS","JADJS","OCS","DOBS","DCLP","DIRES"},'GL Trans at 29.08.2017'!$AJ:$AJ,">="&R$6,'GL Trans at 29.08.2017'!$AJ:$AJ,"<="&R$8))
 
Upvote 0
Re: How to embed a list range into a sumifs formula

Hi FormR

Thank you for your prompt response. This is exactly what I was trying to get.

The list of codes are going to grow with future TBS.
Is there a way to embed a data list instead of me adding to the list of codes within the formula?
Ideally it would be great if I can just add to a list within the worksheet which the formula looks up against in the same function as the list you have just embedded to the formula.

Many thanks

Ed
 
Upvote 0
Re: How to embed a list range into a sumifs formula

Ideally it would be great if I can just add to a list within the worksheet which the formula looks up against in the same function as the list you have just embedded to the formula.

Hi, you can try like this, obviously "list" needs to substituted to a range of cells that contains the codes or a named range that refers to the same:


Rich (BB code):
=SUMPRODUCT(SUMIFS('GL Trans at 29.08.2017'!$J:$J,'GL Trans at 29.08.2017'!$F:$F,$A10,'GL Trans at 29.08.2017'!$M:$M,list,'GL Trans at 29.08.2017'!$AJ:$AJ,">="&R$6,'GL Trans at 29.08.2017'!$AJ:$AJ,"<="&R$8))
 
Upvote 0
Re: How to embed a list range into a sumifs formula

Hi FormR

Great this will work nicely. I appreciate your quick, helpful responses today.

Many thanks
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

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