VLOOKUP query

excel_beta_345User

New Member
Joined
Jun 17, 2024
Messages
12
Office Version
  1. 365
Platform
  1. Windows
I want to apply vlookup based on lookup value from column H for Column B to E all at once. Right now I can increment number in next column and do vlookup to get values but how can I do it once for all of those in one go ?
 

Attachments

  • 3.jpg
    3.jpg
    183.5 KB · Views: 9

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Hello,
On Excel 365 you can use XLOOKUP like so
In I2
Excel Formula:
=XLOOKUP(H2, $A$2:$A$26, $B$2:$E$26)
Then extend downwards.
 
Upvote 0
Ah yes sorry i tested the formula with sorted values. You need to add the exact match parameter, like so
Excel Formula:
=XLOOKUP(H2, $A$2:$A$26, $B$2:$E$26, , 0)
 
Upvote 0
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.)

Using my smaller sample data the formula as posted in post #2 works for me - see columns N:R below. (The exact match parameter is the default in XLOOKUP)

However, you might also consider the formula in I2 as it does not need to be copied down and will return all results from that single cell formula.

25 01 22.xlsm
ABCDEFGHIJKLMNOPQR
1IDNameColourTeamDateIDNameColourTeamDateIDNameColourTeamDate
2OneName 1RedTeam 115/01/2023TwoName 2BlueTeam 28/03/1997TwoName 2BlueTeam 28/03/1997
3TwoName 2BlueTeam 28/03/1997OneName 1RedTeam 115/01/2023OneName 1RedTeam 115/01/2023
4ThreeName 3WhiteTeam 322/07/2015ThreeName 3WhiteTeam 322/07/2015ThreeName 3WhiteTeam 322/07/2015
5FourName 4BlackTeam 43/12/2001SixName 6YellowTeam 626/10/2020SixName 6YellowTeam 626/10/2020
6FiveName 5GreenTeam 514/06/1989FourName 4BlackTeam 43/12/2001FourName 4BlackTeam 43/12/2001
7SixName 6YellowTeam 626/10/2020FiveName 5GreenTeam 514/06/1989FiveName 5GreenTeam 514/06/1989
8
Sort
Cell Formulas
RangeFormula
I2:L7I2=SORTBY(B2:E7,MATCH(A2:A7,H2:H7,0))
O2:R7O2=XLOOKUP(H2, $A$2:$A$7, $B$2:$E$7)
Dynamic array formulas.
 
Upvote 0
Solution
Ah yes sorry i tested the formula with sorted values. You need to add the exact match parameter, like so
Excel Formula:
=XLOOKUP(H2, $A$2:$A$26, $B$2:$E$26, , 0)
Exact match is actually the default for XLOOKUP.
 
Upvote 0
Thank yo
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.)

Using my smaller sample data the formula as posted in post #2 works for me - see columns N:R below. (The exact match parameter is the default in XLOOKUP)

However, you might also consider the formula in I2 as it does not need to be copied down and will return all results from that single cell formula.

25 01 22.xlsm
ABCDEFGHIJKLMNOPQR
1IDNameColourTeamDateIDNameColourTeamDateIDNameColourTeamDate
2OneName 1RedTeam 115/01/2023TwoName 2BlueTeam 28/03/1997TwoName 2BlueTeam 28/03/1997
3TwoName 2BlueTeam 28/03/1997OneName 1RedTeam 115/01/2023OneName 1RedTeam 115/01/2023
4ThreeName 3WhiteTeam 322/07/2015ThreeName 3WhiteTeam 322/07/2015ThreeName 3WhiteTeam 322/07/2015
5FourName 4BlackTeam 43/12/2001SixName 6YellowTeam 626/10/2020SixName 6YellowTeam 626/10/2020
6FiveName 5GreenTeam 514/06/1989FourName 4BlackTeam 43/12/2001FourName 4BlackTeam 43/12/2001
7SixName 6YellowTeam 626/10/2020FiveName 5GreenTeam 514/06/1989FiveName 5GreenTeam 514/06/1989
8
Sort
Cell Formulas
RangeFormula
I2:L7I2=SORTBY(B2:E7,MATCH(A2:A7,H2:H7,0))
O2:R7O2=XLOOKUP(H2, $A$2:$A$7, $B$2:$E$7)
Dynamic array formulas.
Thank you so much for this, it helped me immensely. I used sortby function as you suggested. And apologies for not using XL2BB, unfortunately that addon does not work due to company policies on O365.
 
Upvote 0
Thank you so much for this, it helped me immensely.
You're welcome. Thanks for the follow-up. :)


apologies for not using XL2BB, unfortunately that addon does not work due to company policies on O365.
If you are not able to use XL2BB due to company policy then in any future threads you start, I suggest that you point that out in post 1 otherwise you will likely keep getting asked. :cool:
 
Upvote 0

Forum statistics

Threads
1,226,079
Messages
6,188,773
Members
453,499
Latest member
samdan87153

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