Index match where one of the elements is ideally a variable

Red over White

Board Regular
Joined
Jul 16, 2011
Messages
123
Office Version
  1. 365
Platform
  1. MacOS
I am trying to create an INDEX/MATCH formula where one of the criteria will eventually be a variable. To reach this point I have been using codes that normally signify the look up value is anything but a blank cell, but my attempts to date (cells G25-G27) have not worked. The extract below is part of a larger file where Column C has a number of different league names, and so whilst the formula at G28 works and selects the correct date it is only because I have linked the league name to a cell (D23) which has that name.

How can I express look up value as something other than blank?


Rugby frequency.xlsx
ABCDEFGH
1SeasonDateLeagueTeamH/AForAgainstResult
22021-2204/09/21North PremYorkH3310W
32021-2211/09/21North PremPreston GrasshoppersH295W
42021-2218/09/21North PremMacclesfieldA5824W
52021-2225/09/21North PremSandalH1017L
62021-2202/10/21BillinghamA1616D
72021-2216/10/21North PremBlackburnH3319W
82021-2223/10/21North PremLymmA3015W
92021-2230/10/21North PremKirkby LonsdaleH745W
102021-2206/11/21MacclesfieldH5813W
112021-2213/11/21North PremRossendaleA4316W
122021-2220/11/21North PremWirralH3914W
132021-2227/11/21North PremAlnwickP 
142021-2204/12/21North PremBurnageH5017W
152021-2211/12/21North PremNorthwichA590W
16
17
18
19
20
21
22Macclesfield
23North PremHighest score58
24Non league matchWhen06/11/21""
25League match#N/A"<>"""
26#N/A"<>0"
27#N/A">0"
2818/09/21
Data
Cell Formulas
RangeFormula
H2:H15H2=IF(F2="","",IF(F2>G2,"W",IF(F2<G2,"L","D")))
G23G23=INDEX(B2:F15,MATCH(D22,D2:D15,0),5)
G24G24=INDEX(B2:B15,MATCH(1,(""=C2:C15)*(D22=D2:D15)*(G23=F2:F15),0))
G25G25=INDEX(B$2:B$15,MATCH(1,("<>"""=C$2:C$15)*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))
G26G26=INDEX(B$2:B$15,MATCH(1,("<>0"=C$2:C$15)*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))
G27G27=INDEX(B$2:B$15,MATCH(1,(">0"=C$2:C$15)*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))
G28G28=INDEX(B$2:B$15,MATCH(1,(D23=C$2:C$15)*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))
Press CTRL+SHIFT+ENTER to enter array formulas.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Hi,

Change your G25 formula to:

Excel Formula:
=INDEX(B$2:B$15,MATCH(1,(""<>C$2:C$15)*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))

Array Entered CSE
 
Upvote 0
Solution
Not entirely sure what you are trying to do, but maybe
Excel Formula:
=INDEX(B$2:B$15,MATCH(1,(C$2:C$15<>"")*(D$22=D$2:D$15)*(G$23=F$2:F$15),0))
 
Upvote 0
You're welcome, thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,453
Members
448,967
Latest member
grijken

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