Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
extend selection
I have contiguous data starting in c5. The last row and
the number of columns is not known. I can select the data cells with the following code: Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select However, how do I extend this selection by one row. Say that I have selected range C5:J14. How would I be able to select C5:J15? I would like to extend the selection without hardcoding it by one row so that I can get the row totals. Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
extend selection
Indu,
Add this line to your code Selection.Resize(Selection.Rows.Count + 1, Selection.Columns.Count).Select -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "indu aronson" wrote in message ... I have contiguous data starting in c5. The last row and the number of columns is not known. I can select the data cells with the following code: Range(Selection, Selection.End(xlDown)).Select Range(Selection, Selection.End(xlToRight)).Select However, how do I extend this selection by one row. Say that I have selected range C5:J14. How would I be able to select C5:J15? I would like to extend the selection without hardcoding it by one row so that I can get the row totals. Thanks for your help. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Limiting selection in a cell AND linking that selection to a list | Excel Discussion (Misc queries) | |||
Extend the numbers 1,2 to get 3,4,5,..... | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Extend Formula | Excel Discussion (Misc queries) | |||
Extend formulas | Excel Discussion (Misc queries) |