Return a list of dates and form average from a table

mark hansen

Well-known Member
Joined
Mar 6, 2006
Messages
534
Office Version
  1. 2016
Platform
  1. Windows
I need help with a complex formula that will search four columns of a table and create a list of dates that match that criteria. I figure it will an array formula and I have found some examples when the criteria is 1 column, but not 4.

The Table is "Table1"
The column with the date I need in the list is [Date of Proc]

The Criteria is
[Name] = AE35
[PGY]= AU35
[AY]BI35
[Proc]=DB58

The list will start in DB60.

I also need to use the same formula to pull a value from another column, but I think I can change the [Date of proc] field for [Avg of Form] column to get the value in that column. I'll be making a graph when the resulting two columns.

Thanks for any help.
Mark
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Hi Mark,

Can you post some sample data just to confirm the header names of your table, also to clarify you want to enter your criteria in the above ranges and return the values starting from DB60?
 
Upvote 0
Maybe this, paste formulas & drag down as far as needed.

Just change the ranges to suit your data.



Book1
ABCDEF
1CriteriaNamePGYAYProcCountifs
2Name1PGY1AY1Proc14
3
4Date of ProcNamePGYAYProcAvg of form
501-10-19Name1PGY1AY1Proc11
602-10-19Name2PGY2AY2Proc22
703-10-19Name3PGY3AY3Proc33
804-10-19Name4PGY4AY4Proc44
905-10-19Name1PGY1AY1Proc15
1006-10-19Name6PGY6AY6Proc66
1107-10-19Name1PGY1AY1Proc17
1208-10-19Name8PGY8AY8Proc88
1309-10-19Name9PGY9AY9Proc99
1410-10-19Name1PGY1AY1Proc110
15
16DatesAvg
1701-10-191
1805-10-195
1907-10-197
2010-10-1910
Sheet1
Cell Formulas
RangeFormula
F2=COUNTIFS(Table1[Name],B2,Table1[PGY],C2,Table1[AY],D2,Table1[Proc],E2)
A17{=IF(ROWS(A$17:A17)>$F$2,"",INDEX(Table1[Date of Proc],SMALL(IF(Table1[Name]&Table1[PGY]&Table1[AY]&Table1[Proc]=$B$2&$C$2&$D$2&$E$2,ROW(Table1[Date of Proc])-ROW(Table1[#Headers])),ROWS(A$17:A17))))}
B17{=IF(ROWS(B$17:B17)>$F$2,"",INDEX(Table1[Avg of form],SMALL(IF(Table1[Name]&Table1[PGY]&Table1[AY]&Table1[Proc]=$B$2&$C$2&$D$2&$E$2,ROW(Table1[Date of Proc])-ROW(Table1[#Headers])),ROWS(B$17:B17))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
thanks so much for your help Ras, I really appreciate it. These formula are working out well!!!
 
Upvote 0

Forum statistics

Threads
1,223,923
Messages
6,175,399
Members
452,640
Latest member
steveridge

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