Good Morning, All,
Sorry for the title but I couldn't think of how else to word it. I've attached an excel sheet for your view. This may be a tall request, but I'm unsure how to accomplish it.
I have an excel spreadsheet that queries a SQL database and returns information in the form of a table; the results could be 1 row or could be 100 rows, we never know. Based on the information that the query returns, I would like to be able to hit a button in excel that then copies a hidden sheet times however many rows of results, then makes each corresponding sheets cells equal to that row.
For example, in the spreadsheet that I've attached, we have a 3 spreadsheets; one named 'Table', one named '5199 PN1' and the other named '5200 PN2'. The 'Table' sheet is what the query would return and then ideally, I'd like to be able to push a button that took that data and put it into a template similiar to that seen on '5199 PN1' and '5200 PN2', with the exception that each tab would be relative to each row. I'd like for the amount of tabs to match the amount of records returned from the query and the tab names to be generated from the the 'A' and 'B' column of each respective row.
I've highlighted cells with formulas. I would GREATLY appreciate anyone's help in this. And thank you in advance!
Bookmarks