Vlookup, variable lookup table array

Hutchisonryan

New Member
Joined
Mar 3, 2012
Messages
8
I've been working on this project for quite some time, and I've found solutions that get me close, but don't solve my problem. I typically like to figure things out on my own, because I feel that's how you learn best, but after months of work I'm finally breaking down and asking for help (mainly because my VP caught wind of my project, and wants to roll company wide.) So to be able to understand my question fully, I will explain in detail:

This is a performance tracker for servers in a restaurant. The spreadsheets operates in a way so that I can export a report from my POS (Point Of Sale) PC, to my desktop PC via a network drive. I can then copy and paste the report in my workbook and the spreadsheet will auto-populate. There are two reports I'm using. The first is static, and I can auto-populate by stacking Index(Match(Offset no problem. These are basic stats like sales, comps, PPA etc. The second part of the report has to deal with specific focus items sold per individual. Here is where it's getting messy. This report changes size every time you run it, depending on how many people you have on the clock and which items they sold. I need the lookup table to be able to adjust it's size, as to not include other employees items in it's table. Every item has a specific "plu" number attached to it, so I can vlookup to find it. The closest I have gotten is using VLOOKUP(MATCH(OFFSET(COUNTIF - using COUNTIF to dictate the hight of the table, but then I'm back to my original issue, COUNTIF needs a range, which will change every time. If anyone can lead me in the right direction, it would be phenomenally appreciated. Sorry for the novel. Let me know if there are any questions or more information is needed. Thanks in advance.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Hello and welcome.
To find last non empty cell in a table you can use:
=MATCH(9.99999999999999E+307,A:A)
but sample of your data will be useful to see what exactly do you need.
You can download and install two of the following programs:

HTLMaker

or
Excel Jeanie


or when using Internet Explorer just put borders around your data in Excel and copy those cells into your post.
 
Upvote 0
> I need the lookup table to be able to adjust it's size, as to not include other employees items in it's table.

Why is it a problem that the table you refer to also has other employees?
 
Upvote 0
I need to make sure it doesn't include other employees in the table, because the item will appear on the report several times. I just want the spreadsheet to pull how many of that item that specific individual sold. For example:


Excel Workbook
ABCDEFGHIJ
16Clifford, Bernard5031Coffee72.9520.65020.6500.03
177386Flavored\nTea193.9975.81075.8100.11
1820008Art &Spin\nDip*18.998.9908.9900.01
1920038Rang\nRattlr6*413.4953.96053.9600.08
2020040Range\nRattlr*29.9919.98415.9820.020.03
2121721Filet\nOscarShr329.9889.94089.9400.13
2221754Top 9\nw/Shr1019.99199.90199.900.3
2321759Ribey10\nBBQShr624.99149.940149.9400.22
2424511Smothered\nTopp32.497.4707.4700.01
2527603Chz\nCake36.9920.97020.9700.03
2627636Blkbry\nChzCake46.9927.96027.9600.04
27956399Coronarita45.9923.96023.9600.04
28------------------------------------------------------------------------------------
29Tot Total PPA Booster:6610.6699.534695.530.571.04
30
31Hicks, Joshua7386Flavored\nTea13.993.9903.9900.01
3220008Art &Spin\nDip*18.998.9908.9900.01
3320040Range\nRattlr*49.9939.96831.9620.020.06
3421754Top 9\nw/Shr219.9939.98039.9800.06
35------------------------------------------------------------------------------------
36Tot Total PPA Booster:811.6292.92884.928.610.14
37
38Hegner, Donna5031Coffee42.9511.8011.800.02
397386Flavored\nTea183.9971.82071.8200.11
4021721Filet\nOscarShr129.9829.98029.9800.04
4121759Ribey10\nBBQShr824.99199.920199.9200.3
4224511Smothered\nTopp52.4912.45012.4500.02
4324744Pepper\nSauce44.4917.96017.9600.03
4427605Chzcake\nLun Ct13.993.9903.9900.01
45------------------------------------------------------------------------------------
46Tot Total PPA Booster:418.49347.920347.9200.52
Sheet1


As you can see all of the employees lists are different sizes. This will be the case every time the report is ran, or the employee could not even show up at all. Thanks again for all the help and quick responses.
 
Upvote 0
You mean by copy and pasting the employees name down column A to appear next to all of the items? Or create a page for each employee so that you can use the whole page as a table?
 
Upvote 0
You mean by copy and pasting the employees name down column A to appear next to all of the items? Or create a page for each employee so that you can use the whole page as a table?

I mean for example copying Clifford, Bernard from row 16 to row 29...
 
Upvote 0
If there was a macro you could run easily then that would work. This is going to be distributed to all stores in the company, (to some individuals not experienced with excel), so the idea is to make it as easy, functional, and efficient as possible. It would be a report we would run daily, so the goal is to make it quick and easy for all.
 
Upvote 0
Robert Mika mentioned finding the last non empty cell in a table. Is there a way I could find the next cell with data in it (the next name on the list) possibly using match as an array formula, and offset it -1?
 
Upvote 0
I figured it out, after many many late nights of coding. Here is the answer: (must be entered as an array)

{=VLOOKUP(J11,OFFSET(INDEX('Svr Performance Measure Month 1'!A:A,MATCH(H11,'Svr Performance Measure Month 1'!A:A,0),),0,2,MATCH(1,(INDIRECT(ADDRESS((MATCH(H11,'Svr Performance Measure Month 1'!A:A,0)+1),1,,,"Svr Performance Measure Month 1")):INDIRECT(ADDRESS((MATCH(H11,'Svr Performance Measure Month 1'!A:A,0)+50),1,,,"Svr Performance Measure Month 1"))<>32)*1,0),3),3,0)}

By using match as an array to count, and then multiplying by 1 to return T/F binary, you can pop it into offset to create a table array! This also had to be coupled with the code function to turn cell text to numerical value. (Hince the <>32)
 
Upvote 0

Forum statistics

Threads
1,216,119
Messages
6,128,941
Members
449,480
Latest member
yesitisasport

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