Search value in a range and return another value on the same row

JoshJ86

New Member
Joined
Dec 4, 2024
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi There,

I cant figure this out how to get this to work. I have searched and tried so many existing solutions with no success. Any help would be much appreciated!

Basically, what I want is populate the reference from column B to column K, by finding the value from column J in the range C2:H5.
 

Attachments

  • Screenshot 2024-12-05 143823.png
    Screenshot 2024-12-05 143823.png
    35.3 KB · Views: 5

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
An example of the desired result will often be much more useful than a description alone. The post title suggests you want a value from some other cell in the same row. The description suggests you want the cell address, in which case K2 would contain "B2". Or would it be "C2"? Or maybe I'm that guy at "darts and balloons booth" at the county fair, and so far, no 'pop'. :)
 
Upvote 0
Sorry I find these problems hard to explain. I hope this helps.
 

Attachments

  • Screenshot 2024-12-05 143823.png
    Screenshot 2024-12-05 143823.png
    53.7 KB · Views: 5
Upvote 0
Welcome to the MrExcel board!

For the future, I suggest that you investigate XL2BB for providing sample data to make it easier for helpers by not having to manually type out sample data to test with.
(If you have trouble with XL2BB, review the "XL2BB Icons greyed out" link in the 'Known XL2BB issues' section near the top of the XL2BB Instructions page linked above.)

See if this does what you want.
I have assumed that there will not be duplicates in C2:H5.
Also, it is hard to tell if your values are Text values or actual Numbers.
My formula in the mini sheet below will return the Reference values as Text. If they need to be Numbers then try this instead.
Excel Formula:
=IFERROR(--CONCAT(IF(C$2:H$5=J2,B$2:B$5,"")),"")

24 12 05.xlsm
BCDEFGHIJK
1Ref
2200124716520012343652001240743200125090820012423333001242333555555555520012494042001233353
3200124763320012440062001240610200124706720012323882001232389555555555620012323882001247633
4200124660720012320122001236022200123758640012349142001230854555555555720012406102001247633
5200123335320012494042001234914200123647720012494052001246854555555555820012364772001233353
620012423332001247165
720012360222001246607
87001242333 
920012509082001247165
1020012407432001247165
1120012468542001233353
1220012323882001247633
1320012494042001233353
147777777777 
1520012440062001247633
1620012349142001233353
1720012320122001246607
1820012375862001246607
1920012349142001233353
2020012470672001247633
2120012343652001247165
2255555555562001247633
23
Reference
Cell Formulas
RangeFormula
K2:K22K2=CONCAT(IF(C$2:H$5=J2,B$2:B$5,""))
 
Last edited:
Upvote 0
Try. In K2
Excel Formula:
=LET(a,B2:B5,b,C2:H5,BYROW(J2:J25,LAMBDA(ro,IFERROR(INDEX(a,SMALL(IF(b=ro,ROW(b),""),1)-ROW(A1)),""))))
 
Upvote 0
=IFERROR(--CONCAT(IF(C$2:H$5=J2,B$2:B$5,"")),"")
Hi Peter, thank you so much for taking the time and manually entering in the data to figure this out for me! You are a life saver, and I really appreciate it. This was my first post and if I ever post again, I will 100% figure out how get and use XL2BB to make everything simple and easy. Thanks again!
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0

Forum statistics

Threads
1,224,522
Messages
6,179,297
Members
452,903
Latest member
Knuddeluff

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