VBA Match Cells, Copy Adjacent Cells

Lelewiwi

Board Regular
Joined
Nov 8, 2023
Messages
50
Office Version
  1. 365
Platform
  1. Windows
Hi all - I've been searching for days for a solution and have yet to find one that works. Doesn't necessarily need to be VBA, but I think it has to be as formula's don't seem to work. I have 2 sheets "Split Request" and "Hidden".

Split Request has account numbers in cells E9:E47. These are in numerical order.
Hidden has account numbers in column A. These are not necessarily in numeric order.

I need something that will search Hidden, Column A for a matching account number from Split Request E9:E47. If a match is found, it should copy the adjacent cell from Column B to the adjacent cell of the account number on Split Request, column F.

Thanks so much for the help!
 

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
Perhaps this:

Excel Formula:
=XLOOKUP(E9,Hidden!$A$1:$A$39,Hidden!$B$1:$B$39,,0)
 
Upvote 0
All of them. And before you ask, they are all formatted the same.
That may have been my next question.... But since you've confirmed they are the same, would you mind posting a sample of the account numbers that I may test on?
 
Upvote 0
That may have been my next question.... But since you've confirmed they are the same, would you mind posting a sample of the account numbers that I may test on?
I'm not allowed to download the add on, so screen shots will have to do.
 

Attachments

  • Screenshot 2024-01-12 153615.jpg
    Screenshot 2024-01-12 153615.jpg
    166.9 KB · Views: 9
  • Screenshot 2024-01-12 153641.jpg
    Screenshot 2024-01-12 153641.jpg
    83.5 KB · Views: 9
Upvote 0
Could you copy the formula from F9 exactly as you have entered it?
 
Upvote 0
I copied exactly what was written above:

=XLOOKUP(E9,Hidden!$A$1:$A$39,Hidden!$B$1:$B$39,,0)
 
Upvote 0
How about
Excel Formula:
=XLOOKUP(E9+0,Hidden!$A$1:$A$39,Hidden!$B$1:$B$39,,0)
 
Upvote 0
Solution

Forum statistics

Threads
1,215,073
Messages
6,122,975
Members
449,095
Latest member
Mr Hughes

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