INDEX MATCH

Loper

New Member
Joined
Nov 15, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Perhaps I am missing a step. The database contains data from 1/1/2018 through 12/31/2029. In cell D8, I am trying to match a date from (column A) with a calculated maximum value, (cell C8). The current formula returns the incorrect date of 10/17/2022 and the matched value for that date is not 0.022. Should I be using a different formula?

WORKSHEETS.xlsm
ABCDEFGH
1
2
3Enter a Well #1
4Enter a beginning date of a Month, (M/D/YYYY)1/1/2018
5Results for January, 2018
6Well # 1Distribution System
7Total0.077Total41.693
8Maximum0.022on 10/17/2022Maximum1.685
9Average0.002Average1.345
10
11
12WELL # 1, MGDWELL # 2, MGDWELL # 6, MGDWELL # 7, MGDWELL # 8, MGDWELL # 9, MGDDaily Demand
13Date
141/1/20180.0010.6490.0020.0010.0000.6031.257
151/2/20180.0010.6280.0010.0020.0000.5581.190
161/3/20180.0000.5820.0060.0000.0000.5621.150
171/4/20180.0080.6210.0070.0000.0000.6161.252
181/5/20180.0000.6240.0030.0000.0000.7111.339
191/6/20180.0000.5900.0000.0000.0000.7771.366
201/7/20180.0000.6010.0030.0000.0000.8771.480
211/8/20180.0000.6250.0060.0000.0000.9591.590
221/9/20180.0000.6010.0020.2980.0000.7831.684
231/10/20180.0020.6050.0020.2560.0000.8201.685
241/11/20180.0030.4770.0050.2260.0000.8661.577
251/12/20180.0020.5420.0010.7880.0000.2251.558
261/13/20180.0040.5510.0040.7150.0000.0011.275
271/14/20180.0020.6370.0030.5700.0000.4301.642
281/15/20180.0030.6000.0020.5530.0000.3291.487
291/16/20180.0040.6360.1770.0000.0000.6641.481
301/17/20180.0220.5660.0130.7650.0210.0081.395
311/18/20180.0010.6060.0010.7370.0000.0031.348
321/19/20180.0030.5750.0020.0260.0000.6791.285
331/20/20180.0000.5920.0000.0010.0000.6831.276
341/21/20180.0000.5960.0000.0000.0000.6891.286
351/22/20180.0010.6170.0010.0030.0000.6761.299
361/23/20180.0010.6060.0030.0020.0000.5901.202
371/24/20180.0030.5880.0020.0020.0000.5271.123
381/25/20180.0010.6390.0020.0020.0000.5751.219
391/26/20180.0020.6140.2220.3620.0000.0031.203
401/27/20180.0020.5060.0040.0060.0000.7281.246
411/28/20180.0030.5980.0020.0020.0000.6661.270
421/29/20180.0020.6240.0020.0020.0000.6081.238
431/30/20180.0040.0040.0050.3470.0000.8741.233
441/31/20180.0020.5970.0020.0060.0000.4511.058
452/1/20180.0020.6070.0030.0020.0000.5801.194
462/2/20180.0020.6040.0030.0020.0000.5461.157
472/3/20180.0020.6390.0020.0030.0000.5641.210
482/4/20180.0020.5760.0020.0060.0000.6211.206
492/5/20180.0020.5940.0020.0020.0000.6321.231
502/6/20180.0020.6070.0040.0030.0000.5651.182
512/7/20180.0030.6160.0030.0040.0000.4111.037
522/8/20180.0050.6010.0020.0040.0000.5181.130
532/9/20180.0030.6110.0010.0010.0000.5141.130
542/10/20180.0030.6220.0030.0010.0000.5651.195
552/11/20180.0010.6110.0040.0020.0000.6131.232
562/12/20180.0070.0240.0040.4240.0000.8151.274
572/13/20180.0030.6010.0030.0030.0000.5721.182
582/14/20180.0030.5930.0040.0050.0000.5301.135
592/15/20180.0000.6490.0040.0030.0000.5291.185
602/16/20180.0000.6010.0040.0050.0000.5531.162
612/17/20180.0020.5740.0030.0020.0000.5521.133
622/18/20180.0000.6190.0010.0020.0000.6091.231
632/19/20180.0000.6170.0020.0020.0000.6411.262
642/20/20180.0000.6650.0010.0020.0000.5971.265
652/21/20180.0000.6200.0030.0050.0000.5081.135
662/22/20180.0000.6330.0040.3610.0000.0031.000
672/23/20180.0000.0030.3050.7110.0000.0031.023
682/24/20180.0000.6340.0170.4980.0000.0071.156
692/25/20180.0000.5960.0060.4650.0000.0051.072
702/26/20180.0000.6550.0050.0090.0000.7021.372
712/27/20180.0000.5830.0080.0400.0090.2560.895
722/28/20180.0090.6060.0100.0040.0000.5991.228
MGD DATA
Cell Formulas
RangeFormula
B5B5=G4
B6B6=G3
D8D8=INDEX(A14:A1048576,MATCH(C8,B14:B1048576))
C7C7=IF(G3=1,SUMIFS(B12:B1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=2,SUMIFS(C12:C1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=6,SUMIFS(D12:D1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=7,SUMIFS(E12:E1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=8,SUMIFS(F12:F1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=9,SUMIFS(G12:G1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),""))))))
C8C8=IF(G3=1,MAXIFS(B12:B1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=2,MAXIFS(C12:C1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=6,MAXIFS(D12:D1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=7,MAXIFS(E12:E1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=8,MAXIFS(F12:F1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=9,MAXIFS(G12:G1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),""))))))
C9C9=IF(G3=1,AVERAGEIFS(B12:B1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=2,AVERAGEIFS(C12:C1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=6,AVERAGEIFS(D12:D1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=7,AVERAGEIFS(E12:E1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=8,AVERAGEIFS(F12:F1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),IF(G3=9,AVERAGEIFS(G12:G1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0)),""))))))
G7G7=SUMIFS(H12:H1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0))
G8G8=MAXIFS(H12:H1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0))
G9G9=AVERAGEIFS(H12:H1048576,A12:A1048576,">="&G4,A12:A1048576,"<="&EOMONTH(G4,0))
B14:B72B14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 1'!$F4
C14:C72C14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 2'!$F4
D14:D72D14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 6'!$F4
E14:E72E14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 7'!$F4
F14:F72F14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 8'!$F4
G14:G72G14='G:\MUA Server Documents\WATER OPERATIONS\ARCHIVE\2018\[2018.xlsm]WELL # 9'!$F4
H14:H72H14=SUM(B14:G14)
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Hi & welcome to MrExcel.
Try using XMATCH instead of MATCH
 
Upvote 0

Forum statistics

Threads
1,215,069
Messages
6,122,954
Members
449,095
Latest member
nmaske

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