I am not sure whether to do this with native Excel or with VBA.
I have a complex spreadsheet (for me anyway) that is receiving input from other spreadsheets. The other spreadsheets are the "Site Sheets" listed in the log below. On each of these sheets are records I need to essentially combine into the Dashboard sheet. The other total spreadsheet list needs to be somewhat dynamic. Right now, I have it setup so that the user (who is NOT an Excel guy) can easily import new site sheets just by duplicating the old sheets, copying in the file path and clicking a button to update links on that sheet.
I also have the Dashboard sheet setup to index and match through addresses that I need to generate here. I've manually generated the addresses, used INDIRECT to make the sheet addresses variable based on the sheet name, and tested that functionality.
The functionality I need to figure out is how to generate my addresses for each record.
The addresses will look like this:
That is, from the stuff in RED above, I need to generate an array with the record number, from 1 to 246 (variable, driven) with a list of sites (Ft. Myers) and 1-75 job index numbers for Ft. Myers (variable number, driven by the value in the red cells) followed by another series of records (76-125) for (Hammond) with 1-49 job index numbers, etc.
I attempted doing this with VBA but ran into issues with the syntax for arrays. I am not sure what I am doing wrong. I am also unsure if it wouldn't make more sense to use a native Excel function but I'm also not sure how to do that. Variable length and flexible arrays are a bit beyond me. I tried doing a 2-D array and gave it up due to ignorance. Here's a snap-shot of an attempt with a 1-D array and an error that pops up. I am not sure what my syntax error is. If you have any advice, please help.
I have a complex spreadsheet (for me anyway) that is receiving input from other spreadsheets. The other spreadsheets are the "Site Sheets" listed in the log below. On each of these sheets are records I need to essentially combine into the Dashboard sheet. The other total spreadsheet list needs to be somewhat dynamic. Right now, I have it setup so that the user (who is NOT an Excel guy) can easily import new site sheets just by duplicating the old sheets, copying in the file path and clicking a button to update links on that sheet.
I also have the Dashboard sheet setup to index and match through addresses that I need to generate here. I've manually generated the addresses, used INDIRECT to make the sheet addresses variable based on the sheet name, and tested that functionality.
The functionality I need to figure out is how to generate my addresses for each record.
The addresses will look like this:
That is, from the stuff in RED above, I need to generate an array with the record number, from 1 to 246 (variable, driven) with a list of sites (Ft. Myers) and 1-75 job index numbers for Ft. Myers (variable number, driven by the value in the red cells) followed by another series of records (76-125) for (Hammond) with 1-49 job index numbers, etc.
I attempted doing this with VBA but ran into issues with the syntax for arrays. I am not sure what I am doing wrong. I am also unsure if it wouldn't make more sense to use a native Excel function but I'm also not sure how to do that. Variable length and flexible arrays are a bit beyond me. I tried doing a 2-D array and gave it up due to ignorance. Here's a snap-shot of an attempt with a 1-D array and an error that pops up. I am not sure what my syntax error is. If you have any advice, please help.