formula for multiple search and input to another cell from information column

PuntingJawa

Board Regular
Joined
Feb 25, 2021
Messages
162
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
I'm trying to shorten a formula to automate input to another cell. I have a list in column T3 through T35. What I am trying to do is if you input a number in a cell in E column and it matches one of the cells in T3-T35 it would return the value in S3 through S35 column into D column.
Example:
If I input a phrase in E2 it'll search T3 through T35. Say it finds that the match in T15 it'll input S15 into D2.

Book1
ABCDEFGHIJKLMNOPQRST
1LocationUniqueCodePart IDParts List
2NameCodePart ID
3L164s5530
4R165s5193
5E118s62
6D166s5211
7S167s6347
8ML168s5213
9MR169s5214
10MLR170s6282
11MLL171s6283
12Cin172s6284
13Cex173s6285
14GEX174s6286
15GIN175s6287
16MK176s6290
17CID177s6291
18DHL279s6726
19DHR280s6728
20H-01694s6740-01
21H-0295s6740-02
22H-03696s6740-03
23H-04697s6740-04
24H-05698s6740-05
25H-06699s6740-06
26H-08701s6740-08
27H-09702s6740-09
28H-10703s6740-10
29H-11704s6740-11
30H-12705s6740-12
31H-13706s6740-13
32H-14707s6740-14
33H-15709s6740-16
34H-16804s6740-17
35H-17805s6740-18
Sheet1
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
=FILTER(S3:S35,T3:T35=E2)

Book7
ABCDEFGHIJKLMNOPQRST
1LocationUniqueCodePart IDParts List
2118s62T3 through T35. What I am trying to do is if you input a number in a cell in E column and it matches one of the cells in T3-T35 it would return the value in S3 through S35 column into D column. Example: If I input a phrase in E2 it'll search T3 through T35. Say it finds that the match in T15 it'll input S15 into D2.NameCodePart ID
3L164s5530
4R165s5193
5E118s62
6D166s5211
7S167s6347
8ML168s5213
9MR169s5214
10MLR170s6282
11MLL171s6283
12Cin172s6284
13Cex173s6285
14GEX174s6286
15GIN175s6287
16MK176s6290
17CID177s6291
18DHL279s6726
19DHR280s6728
20H-01694s6740-01
21H-0295s6740-02
22H-03696s6740-03
23H-04697s6740-04
24H-05698s6740-05
25H-06699s6740-06
26H-08701s6740-08
27H-09702s6740-09
28H-10703s6740-10
29H-11704s6740-11
30H-12705s6740-12
31H-13706s6740-13
32H-14707s6740-14
33H-15709s6740-16
34H-16804s6740-17
35H-17805s6740-18
Sheet1
Cell Formulas
RangeFormula
D2D2=FILTER(S3:S35,T3:T35=E2)
 
Upvote 0
How about
Fluff.xlsm
ABCDERST
1LocationUniqueCodePart IDParts List
2118s62NameCodePart ID
3 L164s5530
4175s6287R165s5193
5 E118s62
6 D166s5211
7 S167s6347
8 ML168s5213
9 MR169s5214
10 MLR170s6282
11 MLL171s6283
12 Cin172s6284
13 Cex173s6285
14 GEX174s6286
15 GIN175s6287
16 MK176s6290
17 CID177s6291
18 DHL279s6726
19 DHR280s6728
20H-01694s6740-01
21H-0295s6740-02
22H-03696s6740-03
23H-04697s6740-04
24H-05698s6740-05
25H-06699s6740-06
26H-08701s6740-08
27H-09702s6740-09
28H-10703s6740-10
29H-11704s6740-11
30H-12705s6740-12
31H-13706s6740-13
32H-14707s6740-14
33H-15709s6740-16
34H-16804s6740-17
35H-17805s6740-18
Master
Cell Formulas
RangeFormula
D2:D19D2=IF(E2="","",IFNA(INDEX($S$3:$S$35,MATCH(E2,$T$3:$T$35,0)),""))
 
Upvote 1
Solution
would you give some examples of
If I input a phrase in E2 it'll search T3 through T35. Say it finds that the match in T15 it'll input S15 into D2.
in case that different to
if you input a number in a cell in E column and it matches one of the cells in T3-T35 it would return the value in S3 through S35 column into D column.
 
Upvote 0
would you give some examples of

in case that different to
I thought about the filter formula as well, but it just causes a spill error. I'm still new to learning =filter so I am learning how it reacts.
Fluff had the right idea with using an =IF formula. The one I was going to do was going to be massive as I would have the longest string "=IF" I have ever written.

How about
Fluff.xlsm
ABCDERST
1LocationUniqueCodePart IDParts List
2118s62NameCodePart ID
3 L164s5530
4175s6287R165s5193
5 E118s62
6 D166s5211
7 S167s6347
8 ML168s5213
9 MR169s5214
10 MLR170s6282
11 MLL171s6283
12 Cin172s6284
13 Cex173s6285
14 GEX174s6286
15 GIN175s6287
16 MK176s6290
17 CID177s6291
18 DHL279s6726
19 DHR280s6728
20H-01694s6740-01
21H-0295s6740-02
22H-03696s6740-03
23H-04697s6740-04
24H-05698s6740-05
25H-06699s6740-06
26H-08701s6740-08
27H-09702s6740-09
28H-10703s6740-10
29H-11704s6740-11
30H-12705s6740-12
31H-13706s6740-13
32H-14707s6740-14
33H-15709s6740-16
34H-16804s6740-17
35H-17805s6740-18
Master
Cell Formulas
RangeFormula
D2:D19D2=IF(E2="","",IFNA(INDEX($S$3:$S$35,MATCH(E2,$T$3:$T$35,0)),""))
Thank you so much! With my reply above, my formula would have been massive and hard to fix if I added more lines. I appreciate it!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0
I thought about the filter formula as well, but it just causes a spill error.
that usually means the cells that the filter() is trying to write into already has data in

so if you had
=filter(b2:b10 )
in say Z2
the the cells from Z3 to Z10 need to be empty - for the array formula to fill
so for
=filter(B2:D10 )
in Z2 , then
Z, AA, AB and AC and rows 2:10 would need to be clear

Book7
DEF
1CodePart ID
2NameCodePart ID
3L164s5530
4R165s5193
5E118s62
6D166s5211
7S167s6347
8ML168s5213
9MR169s5214
10MLR170s6282
Sheet1
Cell Formulas
RangeFormula
D2:F10D2=FILTER(R2:T10,U2:U10="")
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,178
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