vLOOKUP help

jwdemo

Board Regular
Joined
Dec 12, 2013
Messages
188
Office Version
  1. 2013
I am wanting to compare 2 sheets and return only the lines that contain matching UPC values to sheet 3.

Sheet 1 is a long list of products, most of which we do not carry in our store. The sheet contains corrections to some products that have recently been made. These corrections are marked in column A with the reason and are highlighted in green. All items that did NOT change have no data in column A.
Sheet 2 is a list of only products we carry.
Sheet 3 I would like to be a list of items that show up on both sheets and that had a change associated with them.

I would like to take the first UPC in Sheet 2 column C (C2) and look in the entire Sheet 1 column H for a match. If there is a match with an item that contains a change, I'd like the entire line copied into sheet 3.

I can use the excel filter tool to show only those with changes but they don't always start on line 1. Would the vLOOKUP be able to only use the visible items on sheet 1?
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
There is a header already and I can filter to show only the changed products. Will vLOOKUP only search through these or will it search through the hidden ones as well?
 
Upvote 0
I wouldn't mind trying to figure it out if I could just get help on entering it into the formula box. I'm just not exactly sure what each entry is needing and I've tried many different attempts with no luck. Could I perhaps get a plain english explanation of the requirements (lookup value, table array, col index number, range lookup)?
 
Upvote 0
ABCD
1jonSalesalexAdmin
2charlieAdmin
3georgePlant
4alexAdmin
5frankPlant
6luisPlant
7jasonSales

<colgroup><col><col><col><col span="2"></colgroup><tbody>
</tbody>

Heres a quick example:
Lookup value is the value you want to search for, table array is the table you want to find it in, col index is the column number within that table that you want your result to come from, range lookup is either exact (false or 0) or approximate match (true or 1).
so here we want to see what department someone is in (in this case "alex") so we put their name in C1. the vlookup for this would be
Code:
=vlookup(C1,A1:B7,2,false)
we want the formula to find the value in C1 in the table A1:B7, return the value from the second column within that table, and false denotes an exact match rather than approximate.
Hope that helps!
 
Upvote 0
I still can't quite get it with what I'm trying to do. Since I'm not sure how to post a screenshot (and it's on several sheets anyways), I'll just try to explain it differently.

I want to take all of the UPCs in column H of Sheet2 and if they are in column D of Sheet1 I would like those lines put on Sheet3.
 
Upvote 0
jwdemo,

Here is my proposal:
1) Create two pivot tables - side by side - on Sheet 3. Source data for first pivot table will be Sheet 1, for second - Sheet 2.
2) Adjust the layout and make sure that the pivot tables do not display items that have blanks in columns where the change is indicated (add this column to filter in pivot table). In other words, make pivot tables display only items with corrections.
3) Then use a combination of INDEX/MATCH to display a list of items that appear on both pivot tables.

You may create a third pivot table - use result of INDEX/MATCH as a source data in this case.

I have a similar solution implemented in one of my workbooks. It's not the prettiest one but works as needed.

You can always add some VBA magic to automate the process.
 
Upvote 0
I'm just not able to get anything to work it seems.

I just want to get the items that show up on Sheet 1 AND Sheet 2 to be copied to Sheet 3.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,918
Members
449,094
Latest member
teemeren

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