Well, Im impressed with the disposition of the people here and their mastery of Excel. Thanks! 2nd question here and it’s kind of vague and exploratory.
I’m exploring using Excel as a database but would like to know if you can create a dialog box in VBA which might permit me to do a query in Excel and dump the results in a particular range or even another worksheet.
As an example, say, I have a table with employees and their rank in sales for every month.
Column A would have the employee names. On Column B would have employee location. Columns C onward would have the months of the year, Jan, Feb, Mar, etc…
If I have 100 employees, then every cell within the table would show their rank in sales for that month, going from No. 1 to No. 100.
On another worksheet I would list the locations on Column A, and the next columns would list product types, say computers, desks and pens, for simplicity’s sake, which would occupy Columns B, C, D. Each location would have the amount of items sold of each type of product in the corresponding cell.
What I’m wondering is if there’s code, or a dialog box I could search in that I could say something like:
1. Go to the locations table
2. Find all locations where – at least 50 computers were sold and 25 desks were sold
3. Go to employee table and get me the employees whose rankings were in the Top 25 at those locations which met that criteria.
4. Print, or dump, the results into a specified range or worksheet
So, for example, I might end up with the following output:
John Dow 4 17 23 21 13
Bob Smith 11 16 22 6
Mark Jones 3 8 4
Because all the people named worked at locations which met the criteria and the numbers beside their names indicate their rank each time they were in the Top 25 of sales for the months where they were (!) in the Top 25. John was in the Top 25 5 times in the year, Bob was 4 times and Mark was 3 times.
I know this is probably pretty complicated. Right now the easiest thing would probably be to have a dialog box which would let me choose the criteria, but if VBA code works, I’d be so (!) happy to try it!
For whatever it’s worth, I’ve attached a 2003 file with some dummy data to illustrate what I’m thinking. It shows a section called ‘Report’ where I’ve slotted in the desired output. I know it’s all kind of unpolished, but I’m just trying to flesh out an idea.
I probably should be using a database for this but I’m just wondering if this can be done in Excel.
I don’t know anythng about Excel dashboards, or how to build them, but maybe that’s what I’m describing. I just don’t know and wanted some ideas.
Thanks, folks!