Vlookup to find multiple entries

Danz_s

Board Regular
Joined
Nov 14, 2004
Messages
69
Hi there,

Hoping someone can shed some light on these requests.

I have a worksheet with data starting on row 5, the data is in columns A through to T. In column B are dates of when the data is populated for each row, multiple entries can be populated each day therefore the date is repeated. When the data is entered it continues underneath the previous days entries.

Challenge 1 :

On the blank second sheet of the workbook I am wanting to enter a date into cell A1 (eg todays date) then starting in cell A3 I want to look up the date that is in A1 on the first sheet (called Report) then return the infomation that is in columns A,G,S & T from all the enries that match.
I have tried VlookUp but ran into the follwing problems, first the look up array is in column B (I can change this if need be to be in column A on the 'Report' page) the next problem is that the VlookUp would only return the first entry it found. The amount of entries can vary everyday.
Hopefully someone has some suggestions on this. :)

Challenge 2 : (sorry, I know im asking a lot)

Same workbook, I want to be able to look up the value that is in column F (starting at row 5 down to the last entry) compare this to another open workbook that is populated with data in columns A through to AD, the lookup array in the second workbook is in column B, if it finds a match i need to return the value from column J from the second work book and copy the result into column U on the 'Report' sheet for the relevant row.
I have a user form in the first work book already that I can use to be able to select the second workbook that it needs to look into, this user form is currently used to get the data into the original workbook on the 'Report' page.

My apologies if that comes across as a bit jumbled i wasnt too sure the best way of explaining.

Any help on either of these is very much appreciated
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
hi, hope this works
New Product List mrexcel sample.xls
ABCDEFGHIJKLMNOPQRSTU
1
2
3
4MonthDateGroupCatClsNew StockcodeLong DescriptionReplacing StockcodeRetail RangePromotionalSeasonalPlanogramPlanogramHeight mmWidth mmDepth mmMerch TypeDisplay TypeSubmitted ByApproved By
5Jul18/07/07ComputersXH036xh1444accessorynoyesYesNOT PLANOGRAMMEDPROMO ONLY26731598ShelfBoxedjoejohn
6Jul18/07/07ComputersXH036xh1444tbayesNoYesNOT PLANOGRAMMEDNOT PLANOGRAMMED26731598ShelfBoxedjimpaul
Report


This is the first work book withe sheet named as 'report' i have only included the first 2 lines of data, hope this is enough
 
Upvote 0
this one is sample data from the second workbook for the second part of my original question
Copy of Test Extract.xls
ABCDEFGHIJ
1APNITMITMDSCVNDNMEITMBRDGRPDSCCATCLSCLSDSCSTS
2123456XH1401unknownunknownunknownunknownXH087AccessoriesFuture
3123456XH1444unknownunknownunknownunknownXH036AccessoriesFuture
4123456XH1704unknownunknownunknownunknownXH037Accessories
5123456XH1709unknownunknownunknownunknownXH037Accessories
6123456XH1710unknownunknownunknownunknownXP054AccessoriesQuit
7123456XH1712unknownunknownunknownunknownXH050Accessories
DSE


thanks again
 
Upvote 0
Update :

I believe I have solved the first part, I had completely overlooked Pivot tables, this seems to do the job a treat.

Still stuck on the second part

Thanks in advance
 
Upvote 0
I have come up with this formula

=INDEX('[Copy of Test Extract.xls]DSE'!$A$2:$Y$65536,MATCH(F5,'[Copy of Test Extract.xls]DSE'!$B$2:$B$65536,TRUE),10)

This will return me the right value, can anyone suggest a way to write this into vba code so it will populate all the cells in column U where there is data for that row. The name of the sheet [Copy of Test Extract.xls]DSE will change from time to time however the data ranges and format wont. As before i have a userform that i could use to get the WBname so will need to incorporate this into the code as well

cheers
 
Upvote 0

Forum statistics

Threads
1,214,653
Messages
6,120,757
Members
448,991
Latest member
Hanakoro

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