Hi,
Brand new to vba and after a bit of searching around, I haven't quite found what I'm trying to do.
1. My workbook has a sheet for all 50 states titled by 2-letter abbreviations.
2. On its own sheet ("export"), I have a table that's named "ExportTable" with 10 rows and 3 columns.
3. Each row has specific states assigned to it in Col B (it may be one state, 2 states, 3 states, 12 states, etc.)
4. I'd like to have all of the rows turned into individual pdf files and each named whatever is in col C (3rd col).
Col A (description) | Col B (state abbreviations separated by space and comma) | Col C (filename for each row)
first 3 example rows:
[table="width: 500"]
[tr]
[td]nw[/td]
[td]wa, or[/td]
[td]nwjan.pdf[/td]
[/tr]
[tr]
[td]ne[/td]
[td]me, nh, vt[/td]
[td]nejan.pdf[/td]
[/tr]
[tr]
[td]mid[/td]
[td]il, in[/td]
[td]midfeb.pdf[/td]
[/tr]
[/table]
Using the first 3 rows as an example, I'd like to have the following as the output of this macro:
1 file named "nwjan.pdf" with the sheets named "wa" and "or" in it.
1 file named "nejan.pdf" with the sheets named "me", "nw", and "vt" in it.
1 file named "midfeb.pdf" with the sheets named "il" and "in" in it.
Etc.
---
Then as a different option to the above example where I'd like to run the macro and have it create files for each row in my table ("ExportTable), I'd like to be able to select specific rows to export. Maybe I don't need to export all of them at once, but I need to export row 2, row 5, and row 10. But this is a "nice to have". To keep it simple, maybe I have a cell all by itself (F3) where I list the values in Col A to determine which rows to export. So F3 = "nw, mid" and instead of exporting all rows into individual pdfs, I only want the rows for "nw" and "mid".
Any help would be appreciated. I know how to select one cell, but I don't know how to parse out the different sheet names in one cell.
Thanks!
Brand new to vba and after a bit of searching around, I haven't quite found what I'm trying to do.
1. My workbook has a sheet for all 50 states titled by 2-letter abbreviations.
2. On its own sheet ("export"), I have a table that's named "ExportTable" with 10 rows and 3 columns.
3. Each row has specific states assigned to it in Col B (it may be one state, 2 states, 3 states, 12 states, etc.)
4. I'd like to have all of the rows turned into individual pdf files and each named whatever is in col C (3rd col).
Col A (description) | Col B (state abbreviations separated by space and comma) | Col C (filename for each row)
first 3 example rows:
[table="width: 500"]
[tr]
[td]nw[/td]
[td]wa, or[/td]
[td]nwjan.pdf[/td]
[/tr]
[tr]
[td]ne[/td]
[td]me, nh, vt[/td]
[td]nejan.pdf[/td]
[/tr]
[tr]
[td]mid[/td]
[td]il, in[/td]
[td]midfeb.pdf[/td]
[/tr]
[/table]
Using the first 3 rows as an example, I'd like to have the following as the output of this macro:
1 file named "nwjan.pdf" with the sheets named "wa" and "or" in it.
1 file named "nejan.pdf" with the sheets named "me", "nw", and "vt" in it.
1 file named "midfeb.pdf" with the sheets named "il" and "in" in it.
Etc.
---
Then as a different option to the above example where I'd like to run the macro and have it create files for each row in my table ("ExportTable), I'd like to be able to select specific rows to export. Maybe I don't need to export all of them at once, but I need to export row 2, row 5, and row 10. But this is a "nice to have". To keep it simple, maybe I have a cell all by itself (F3) where I list the values in Col A to determine which rows to export. So F3 = "nw, mid" and instead of exporting all rows into individual pdfs, I only want the rows for "nw" and "mid".
Any help would be appreciated. I know how to select one cell, but I don't know how to parse out the different sheet names in one cell.
Thanks!