Hello,
I have a spreadsheet that tracks stocks I'm interested in. The first 3 columns are (the rest of the columns being data such as P/E, Yield, etc.)
# Ticker Name
1 BAC Bank of America
1 WFC Wells Fargo
2 IBM IBM
2 ORCL Oracle
2 CSCO Cisco
The '#' is an arbitray grouping ID. 1 is for banking, 2 is for tech, etc. I have a named range, ValTable, that encompasses all the data in the table.
I would like to, in VBA/macro, loop through the ValTable range and copy a subset of the range, based on the # column, to a temporary range variable (let's call it TmpRange). I then want to take TmpRange and put a border around the data it contains in the worksheet using the "borderaround" method. Essentially:
Regards,
Jim
I have a spreadsheet that tracks stocks I'm interested in. The first 3 columns are (the rest of the columns being data such as P/E, Yield, etc.)
# Ticker Name
1 BAC Bank of America
1 WFC Wells Fargo
2 IBM IBM
2 ORCL Oracle
2 CSCO Cisco
The '#' is an arbitray grouping ID. 1 is for banking, 2 is for tech, etc. I have a named range, ValTable, that encompasses all the data in the table.
I would like to, in VBA/macro, loop through the ValTable range and copy a subset of the range, based on the # column, to a temporary range variable (let's call it TmpRange). I then want to take TmpRange and put a border around the data it contains in the worksheet using the "borderaround" method. Essentially:
- Copy all rows from range ValTable where # equals "1" to TmpRange.
- Put a border around the subset (or other formatting).
- Loop through the ValTable range to do the same for #'s 2, 3, etc.
Regards,
Jim