How V look up Array Lookup Duplicates

punnipah

Board Regular
Joined
Nov 3, 2021
Messages
134
Office Version
  1. 2019
Platform
  1. Windows
Hi,


Please help How V look up Array Lookup Duplicates Between Sheet1 and Sheet2.

-Data in Columns "B" (Sheet1) V look up to Columns "B"(Sheet2).
-V lookup Value Columns "C" Get data "Name"





Sheet 1
AB
C​
NoCredit Card No./Transaction No.Name
1559888XXXXXX9930V lookup Value This Columns
2559888XXXXXX4787
3559888XXXXXX4787
4559888XXXXXX2043
5559888XXXXXX2043



Sheet 2
A​
B​
C​
NoCredit Card No./Transaction No.Name
1559888XXXXXX9930Thomas
2559888XXXXXX4787Brooklyn
3559888XXXXXX4787Billiam
4559888XXXXXX2043Sky
5559888XXXXXX2043Sea
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Is this what you mean?

punnipah.xlsm
ABC
1NoCredit Card No./Transaction No.Name
21559888XXXXXX9930Thomas
32559888XXXXXX4787Brooklyn
43559888XXXXXX4787Billiam
54559888XXXXXX2043Sky
65559888XXXXXX2043Sea
Sheet2


punnipah.xlsm
ABC
1NoCredit Card No./Transaction No.Name
21559888XXXXXX9930Thomas
32559888XXXXXX4787Brooklyn
43559888XXXXXX4787Billiam
54559888XXXXXX2043Sky
65559888XXXXXX2043Sea
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=INDEX(Sheet2!C:C,AGGREGATE(15,6,ROW(Sheet2!C$2:C$6)/(Sheet2!B$2:B$6=B2),COUNTIF(B$2:B2,B2)))
 
Upvote 0
Is this what you mean?

punnipah.xlsm
ABC
1NoCredit Card No./Transaction No.Name
21559888XXXXXX9930Thomas
32559888XXXXXX4787Brooklyn
43559888XXXXXX4787Billiam
54559888XXXXXX2043Sky
65559888XXXXXX2043Sea
Sheet2


punnipah.xlsm
ABC
1NoCredit Card No./Transaction No.Name
21559888XXXXXX9930Thomas
32559888XXXXXX4787Brooklyn
43559888XXXXXX4787Billiam
54559888XXXXXX2043Sky
65559888XXXXXX2043Sea
Sheet1
Cell Formulas
RangeFormula
C2:C6C2=INDEX(Sheet2!C:C,AGGREGATE(15,6,ROW(Sheet2!C$2:C$6)/(Sheet2!B$2:B$6=B2),COUNTIF(B$2:B2,B2)))


Thank You Very Much.^^
 
Upvote 0
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
Hi,Peter_SSs


I Have VBA Code : Range("C2").Formula = "=INDEX(WEB!W:W,AGGREGATE(15,6,ROW(WEB!W$2:W$50000)/(WEB!W$2:W$50000=B2),COUNTIF(B$2:B2,B2)))"

But sometimes less 50,000 Rows and sometimes more 50,000 Rows. How to count rows in VBA Code used in this code.



Thank You Very much.
You're welcome. Thanks for the follow-up. :)
 
Upvote 0
I don't think that you have adapted that formula correctly but if it is what you want you can either ..

  • Make the 50,000 big enough to cover any data you might have (maybe 100,000?) or
  • Do something like this.

VBA Code:
Dim LR As Long

LR = Sheets("WEB").Range("W" & Rows.Count).End(xlUp).Row
Range("C2").Formula = Replace("=INDEX(WEB!W:W,AGGREGATE(15,6,ROW(WEB!W$2:W$#)/(WEB!W$2:W$#=B2),COUNTIF(B$2:B2,B2)))", "#", LR)
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,957
Members
449,200
Latest member
indiansth

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