Getting data using vlookup or similar

jdhfch

Board Regular
Joined
Jan 25, 2018
Messages
79
Office Version
  1. 365
Platform
  1. Windows
Hi,

I am trying to extract data from a worksheet into another one using an account number as the reference. On the destination workbook, the account number will only appear once (as per column AC), the source data could have the account number in multiple times and some of the fields on the source file could be blank (or zero value). If I use Vlookup, it is finding only the first instance, and not the one with the data I need in. Below is an example of the dataset and what I would like to see. Can anyone help with this please?
 

Attachments

  • example 2.JPG
    example 2.JPG
    147.2 KB · Views: 15

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
try this

Book1
ABCDEFGHI
1Acc NoStatus1Status2Status3Acc NoStatus1Status2Status3
2101A101ABC
3101B102 B 
4101C103A C
5102B
6103A
7103C
Sheet1
Cell Formulas
RangeFormula
G2:G4G2=IF(COUNTIFS($A$2:$A$7,$F2,B$2:B$7,"A")=1,"A","")
H2:H4H2=IF(COUNTIFS($A$2:$A$7,$F2,C$2:C$7,"B")=1,"B","")
I2:I4I2=IF(COUNTIFS($A$2:$A$7,$F2,D$2:D$7,"C")=1,"C","")
 
Upvote 0
Solution
Per
try this

Book1
ABCDEFGHI
1Acc NoStatus1Status2Status3Acc NoStatus1Status2Status3
2101A101ABC
3101B102 B 
4101C103A C
5102B
6103A
7103C
Sheet1
Cell Formulas
RangeFormula
G2:G4G2=IF(COUNTIFS($A$2:$A$7,$F2,B$2:B$7,"A")=1,"A","")
H2:H4H2=IF(COUNTIFS($A$2:$A$7,$F2,C$2:C$7,"B")=1,"B","")
I2:I4I2=IF(COUNTIFS($A$2:$A$7,$F2,D$2:D$7,"C")=1,"C","")
Perfect.. thank you
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,324
Members
452,635
Latest member
laura12345

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