INDEX, MATCH WITH "&"

Joined
Jan 13, 2021
Messages
20
Office Version
  1. 2007
Platform
  1. Windows
=INDEX(A:A,MATCH("9-"&U29,F:F))

I want the above formula to return a value from column "A" by matching "9-number" from F column.

For example, U29 cell = 135. So 9-135 would be in F:F column and it would give me the data in A column.

Please help. Thanks!
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
In what way doesn't that work?
 
Upvote 0
so what happens
can you provide a sample

that should work
formula in H2

Book5
ABCDEFGHIJKLMNOPQRSTU
1
2fred
3fred 9-135
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29135
Sheet1
Cell Formulas
RangeFormula
H2H2=INDEX(A:A,MATCH("9-"&U29,F:F))
 
Upvote 0
we may need to see an example

as it does work

can 9-135 appear more than once

as you can see on my xl2bb it works returning fred
 
Upvote 0
Try adding the final argument to the match function like
Excel Formula:
=INDEX(A:A,MATCH("9-"&U29,F:F,0))
 
Upvote 0
Solution
TEST.xlsx
ABCDEFGH
1April 16, 2018838388-11April 21, 2018
2April 17, 2018727277-11April 18, 2018
3April 18, 2018131311-11April 26, 2018
4April 19, 2018595955-11April 27, 2018
5April 20, 2018424244-11April 20, 2018
6April 21, 201810100-12April 23, 2018
7April 22, 2018626266-11April 22, 2018
8April 23, 2018525255-21April 17, 2018
9April 24, 2018919199-12April 25, 2018
10April 25, 2018848488-23April 29, 2018
11April 26, 2018252522-1
12April 27, 2018373733-1
13April 28, 2018999999-2
14April 29, 2018919199-3April 27, 2018
Sheet1
Cell Formulas
RangeFormula
C1:C14C1=IF(LEN(B1)=1,"0","")&B1
D1:D14D1=LEFT(C:C,1)
E1:E14E1=D1&"-"&COUNTIF($D$1:D1,D1)
G1G1=SUMPRODUCT(--(LEFT(C:C)="0"))
H1H1=LOOKUP(2,1/("0"=LEFT(C:C,1)),A:A)
G2G2=SUMPRODUCT(--(LEFT(C:C)="1"))
H2H2=LOOKUP(2,1/("1"=LEFT(C:C,1)),A:A)
G3G3=SUMPRODUCT(--(LEFT(C:C)="2"))
H3H3=LOOKUP(2,1/("2"=LEFT(C:C,1)),A:A)
G4G4=SUMPRODUCT(--(LEFT(C:C)="3"))
H4H4=LOOKUP(2,1/("3"=LEFT(C:C,1)),A:A)
G5G5=SUMPRODUCT(--(LEFT(C:C)="4"))
H5H5=LOOKUP(2,1/("4"=LEFT(C:C,1)),A:A)
G6G6=SUMPRODUCT(--(LEFT(C:C)="5"))
H6H6=LOOKUP(2,1/("5"=LEFT(C:C,1)),A:A)
G7G7=SUMPRODUCT(--(LEFT(C:C)="6"))
H7H7=LOOKUP(2,1/("6"=LEFT(C:C,1)),A:A)
G8G8=SUMPRODUCT(--(LEFT(C:C)="7"))
H8H8=LOOKUP(2,1/("7"=LEFT(C:C,1)),A:A)
G9G9=SUMPRODUCT(--(LEFT(C:C)="8"))
H9H9=LOOKUP(2,1/("8"=LEFT(C:C,1)),A:A)
G10G10=SUMPRODUCT(--(LEFT(C:C)="9"))
H10H10=LOOKUP(2,1/("9"=LEFT(C:C,1)),A:A)
H14H14=INDEX(A:A,MATCH("9-"&G1,E:E))
Press CTRL+SHIFT+ENTER to enter array formulas.



As you may see, "9-1" should return April 24, 2018, not April 27, 2018 as shown in cell H14.
 
Upvote 0
@Fluff Strange, in the small, test document I created, the "0" at the end works. However, the same formula with the "0" added at the end in the full spreadsheet causes the result to show "N/A". Could it be that there is too much data to process?
 
Upvote 0

Forum statistics

Threads
1,224,819
Messages
6,181,153
Members
453,021
Latest member
Justyna P

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