TabulaRasa
New Member
- Joined
- Jul 14, 2015
- Messages
- 10
Hi All,
I need to adjust this bit of code (shown below) to select columns G, AO, and AR not just for the title column (row 7) and a single selected cell's row, but for multiple selected rows.
With ActiveCell
Union(Cells(.Row, "G"), Cells(.Row, "AO"), Cells(.Row, "AR"), Cells(7, "G"), Cells(7, "AO"), Cells(7, "AR")).Select 'select the cells you want
For example, if I had selected a cell in row 37, the code above would select cells 37, G and 37, AO and 37, AR as well as the corresponding cells in row 7.
The problem is that if i were to select multiple cells in multiple rows (say 37, 38, and 40) then it would only return the cells in row 7 and the first of the selected rows (37). What I need is for it to select the cells from row 7, 37, 38, and 40.
I would appreciate any help!
I need to adjust this bit of code (shown below) to select columns G, AO, and AR not just for the title column (row 7) and a single selected cell's row, but for multiple selected rows.
With ActiveCell
Union(Cells(.Row, "G"), Cells(.Row, "AO"), Cells(.Row, "AR"), Cells(7, "G"), Cells(7, "AO"), Cells(7, "AR")).Select 'select the cells you want
For example, if I had selected a cell in row 37, the code above would select cells 37, G and 37, AO and 37, AR as well as the corresponding cells in row 7.
The problem is that if i were to select multiple cells in multiple rows (say 37, 38, and 40) then it would only return the cells in row 7 and the first of the selected rows (37). What I need is for it to select the cells from row 7, 37, 38, and 40.
I would appreciate any help!