Displaying Cell based on text

JLazey

New Member
Joined
Sep 28, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello, I have tried VLOOKUP, HLOOKUP, and too many others to list. I think it will be easier to show:
1664386475806.png

So, I have a spread sheet with several different hardware and hundreds of serial numbers. i would like to type in the serial number and see the hardware displayed.
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
If it's just 3 columns of hardware then...unsophisticated...down and dirty...nested Matches. There must be something better to allow for far more columns.

Book1
ABCDEF
1SN2363HAHBHC
2TypeHB123423453456
3123523463457
4123623473458
5123723483459
6123823493460
7123923503461
8124023513462
9124123523463
10124223533464
11124323543465
12124423553466
13124523563467
14124623573468
15124723583469
16124823593470
17124923603471
18125023613472
19125123623473
20125223633474
21
Sheet1
Cell Formulas
RangeFormula
B2B2=IF(ISERROR(MATCH(B1,D:D,0)),IF(ISERROR(MATCH(B1,E:E,0)),IF(ISERROR(MATCH(B1,F:F,0)),"ERROR",F1),E1),D1)
 
Upvote 0
If there are exactly 7 columns just add 4 more nests. Maybe Office 365 has a fancy way to pinpoint a location within the proverbial haystack.

Book1
ABCDEFGHIJ
1SN6807HAHBHCHDHEHFHG
2TypeHF1234789034565678456767892345
31235789134575679456867902346
41236789234585680456967912347
51237789334595681457067922348
61238789434605682457167932349
71239789534615683457267942350
81240789634625684457367952351
91241789734635685457467962352
101242789834645686457567972353
111243789934655687457667982354
121244790034665688457767992355
131245790134675689457868002356
141246790234685690457968012357
151247790334695691458068022358
161248790434705692458168032359
171249790534715693458268042360
181250790634725694458368052361
191251790734735695458468062362
201252790834745696458568072363
211253790934755697458668082364
Sheet1
Cell Formulas
RangeFormula
B2B2=IF(ISERROR(MATCH(B1,D:D,0)),IF(ISERROR(MATCH(B1,E:E,0)),IF(ISERROR(MATCH(B1,F:F,0)),IF(ISERROR(MATCH(B1,G:G,0)),IF(ISERROR(MATCH(B1,H:H,0)),IF(ISERROR(MATCH(B1,I:I,0)),IF(ISERROR(MATCH(B1,J:J,0)),"ERROR",J1),I1),H1),G1),F1),E1),D1)
 
Upvote 0
Solution
Thank you very much for your help. I keep getting a return of "error". Your formula looks good, I just cant get it to return the value I need it to. Am I missing something? I've tried changing the "error" in the formula to the cells I want displayed to no avail.
 
Upvote 0
Here is the actual formula I am using. I've managed to fix the "error" issue, but it doesn't display the correct hardware consistently.
=IF(ISERROR(MATCH(U4,B24:B53,0)),IF(ISERROR(MATCH(U4,C24:C53,0)),IF(ISERROR(MATCH(U4,D24:D53,0)),IF(ISERROR(MATCH(U4,E24:E53,0)),IF(ISERROR(MATCH(U4,F24:F53,0)),IF(ISERROR(MATCH(U4,H24:H53,0)),"ERROR",H21),F21),E21),D21),C21),B21)
 
Upvote 0
My choice to use the word "ERROR" in the formula was not great. Change it to "Not Found." Then we know if the serial number was found or not.

Column G is skipped?
 
Upvote 0
My choice to use the word "ERROR" in the formula was not great. Change it to "Not Found." Then we know if the serial number was found or not.

Column G is skipped?
Yes, the column is skipped because of a merged cell lower on the sheet. I changed it to "N/A". Its still inconsistent with returning results. i have several cells running that formula and sometimes it returns results and sometimes it doesnt, even though the formulas seems to be the same.
 
Upvote 0
You have the formula looking in the hardware columns between rows 24 & 53. That's a set of 30 serial numbers in each column. If there are only 30 then I'd look at the dataset. Might there might be occasional, stray spaces at the end of the serial numbers in the hardware columns?
 
Upvote 0
You have the formula looking in the hardware columns between rows 24 & 53. That's a set of 30 serial numbers in each column. If there are only 30 then I'd look at the dataset. Might there might be occasional, stray spaces at the end of the serial numbers in the hardware columns?
No, I just relooked through all of them. Its really odd
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,955
Members
449,199
Latest member
Riley Johnson

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