Compare cells in two different sheets and copy adjacent cell to specific cell

ssbhatban

Board Regular
Joined
Oct 20, 2015
Messages
78
Office Version
  1. 2010
Platform
  1. Windows
Dear friends
I need a help in solving below problem

I have some 6000 alphanumeric data in column B of sheet 1, I have same or some of the same alpha numeric data of sheet 1 in column B in sheet 2 also. In column C & column D of sheet 2 i have three digit numbers
Now i want to compare column B of sheet 1 with column B of sheet 2, find the matching no & copy the adjacent cell value of column C & D in sheet 2 to matching row of column in B of sheet 1 & place the values in column E column F
If this can be done thru either V or H look up or built in function it is good or else VBA code also OK
It is very urgent can any body help me
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

JEC

Well-known Member
Joined
Aug 21, 2021
Messages
566
Office Version
  1. 365
Platform
  1. Windows
Like this maybe?

In column E
Excel Formula:
=VLOOKUP(B1,Sheet2!$B$1:$D$100,2,0)

In column F
Excel Formula:
=VLOOKUP(B1,Sheet2!$B$1:$D$3,3,0)
 

ssbhatban

Board Regular
Joined
Oct 20, 2015
Messages
78
Office Version
  1. 2010
Platform
  1. Windows
Thanks, looks fine, but my data in both index column will not be sorted, will it work for it
 

JEC

Well-known Member
Joined
Aug 21, 2021
Messages
566
Office Version
  1. 365
Platform
  1. Windows
Yes, should not be a problem
 

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,393
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Solution

ssbhatban

Board Regular
Joined
Oct 20, 2015
Messages
78
Office Version
  1. 2010
Platform
  1. Windows
Thanks for the solution, looks fine, will it also work if columns are not sorted
 

Snakehips

Well-known Member
Joined
May 17, 2009
Messages
5,393
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
Thanks for the solution, looks fine, will it also work if columns are not sorted
Yes it should be fine.

Book1
BCD
1Stuff
2Text21C10D20
3Text13C2D12
4
5Text15C14D24
6Text16C5D15
7Text17C6D16
8xxxxxzC9D19
9Text19C8D18
10Text20C15D25
11Text12C1C11
12Text22C11D21
13Text23C12D22
14Text24C13D23
15AbcC4D14
16Text26C19D29
17Text27C3D13
18Text28C17D27
19Text29C18D28
20Text14C16D26
21Text18st
22
23
Sheet2


Why don't you test it using a sample or backed up data?
 

Forum statistics

Threads
1,148,182
Messages
5,745,210
Members
423,933
Latest member
ankushmukherjee

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
Top