Using INDEX MATCH to Return and Sum Multiple Values that Meet <=Date Criteria

XcelRookie

New Member
Joined
Sep 5, 2017
Messages
5
Not sure if INDEX MATCH is the right function for this - I've struggled to formulate a query to sum multiple values that meet the <= Date criteria. Here's the ask:
ABCD
1DATEP/LLookup Value
25-Sep-17$-92.8031-Aug-17
323-Aug-17$147.70
4$0.00
531-Aug-17$-130.84Lookup Result
623-Aug-17$142.30$159.16 (This is what the
71-Sep-17$164.84formula should return)

<tbody>
</tbody>

1. In Cell D6, I need a formula that will sum all the values in Column B for all the dates in Column A that are LESS THAN OR EQUAL TO the date in Cell D2 (which is entered in Date Format).

2. Some of the cells in the Date Column will be blank so the formula needs to accommodate that.

3. Would be a bonus if the formula could handle dynamic ranges for the columns so the column range would automatically grow as the spreadsheet grows.

Note: It is not practical to sort the dates in ascending or descending order (to take advantage of Match Type) as these fields are part of a large and complex spreadsheet.

Have tried this formula but it returns the values for Aug 31 only: =INDEX(B2:B7,MATCH(D2,A2:A7,0))

Any help or suggestions greatly appreciated!
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Try SUMIFS function if you have a later ver. of Excel. Otherwise look at the SUMPRODUCT function.
If your data rows are only going to be increasing in size then look at setting your data range as a table to make it dynamic.
Excel Workbook
ABCD
1DATEP/LLookup Value
25-Sep-17($92.80)31-Aug-17
323-Aug-17$147.70
4$0.00
531-Aug-17($130.84)
623-Aug-17$142.30159.16
71-Sep-17$164.84159.16
Sheet
 
Upvote 0
You're welcome. Thanks for the feedback. The SUMIFS I believe is a little faster and more efficient than the SUMPRODUCT.
 
Upvote 0

Forum statistics

Threads
1,216,075
Messages
6,128,667
Members
449,462
Latest member
Chislobog

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