I'm entering several rows of information into a worksheet, with several columns per row. Row 1 contains the column headers and rows 2 through n contain values. I want to select multiple rows - typically skipping rows, but sometimes several in a group - and then output the highlighted information to a text file via a macro. The format must be modified though to a single column and include the column headers as labels, with all values for the first row exported first followed by each of the other highlighted rows.
As a simple example, using values in these cells, with similar information in several more rows:
A1 (header): Name
B1 (header): State
C1 (header): Records
A2 (value): John
B2 (value): VA
C2 (value): 14
A3 (value): Bob
B3 (value): WA
C3 (value): 17
Etc...
I want to select rows 2, 3, 6, 7, etc., and output to a text file in this format:
Name=John
State=VA
Records=14
Name=Bob
State=WA
Records=17
Name=Steve
State=CA
Records=22
(Etc)
The correct column header is displayed, followed by =, and then the value, outputting each row completely before proceeding to the next row. Empty cells should also be included in the output, but with only the header, e.g. Records=.
Thanks,
Ken
Bookmarks