Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to select a column within a selection.
For instance if the original selection is A1:D10 I would like to select D1:D10 and then manipulate the data. I have tried many ideas but none seem to work. For instance why doesn't the following select the first cell in the last column of the selection. It selects a cell outside the selection entirely. Selection(Cells(1, Selection.Columns.Count)).Select In addition, isn't the selection the range itself? Msgbox selection.address gives the correct address of the original selection. Thanks for any help. Don |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Don,
Selection.Cells(1, Selection.Columns.Count).Select -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "don" wrote in message I would like to select a column within a selection. For instance if the original selection is A1:D10 I would like to select D1:D10 and then manipulate the data. I have tried many ideas but none seem to work. For instance why doesn't the following select the first cell in the last column of the selection. It selects a cell outside the selection entirely. Selection(Cells(1, Selection.Columns.Count)).Select In addition, isn't the selection the range itself? Msgbox selection.address gives the correct address of the original selection. Thanks for any help. Don |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
With Selection
..Range(Cells(1, .Columns.Count), Cells(.Rows.Count, .Columns.Count)).Select End With Selects D1:D10 when A1:D10 is the original selection Ken Johnson |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure what you're doing, but maybe these will give you some more
alternative: ActiveSheet.Range("a1:d10").Select Selection.Columns(1).Offset(0, 3).Select == ActiveSheet.Range("a1:d10").Select Selection.Columns(4).Select == ActiveSheet.Range("a1:d10").Select With Selection .Columns(.Columns.Count).Select End With don wrote: I would like to select a column within a selection. For instance if the original selection is A1:D10 I would like to select D1:D10 and then manipulate the data. I have tried many ideas but none seem to work. For instance why doesn't the following select the first cell in the last column of the selection. It selects a cell outside the selection entirely. Selection(Cells(1, Selection.Columns.Count)).Select In addition, isn't the selection the range itself? Msgbox selection.address gives the correct address of the original selection. Thanks for any help. Don -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Selecting last five numbers in a selection | Excel Discussion (Misc queries) | |||
how to set shading color of selection when i am selecting cells? | Setting up and Configuration of Excel | |||
Selecting Multiple Columns in a Named Selection | Excel Worksheet Functions | |||
Change from Column Selection to Cell Selection | Excel Programming | |||
Macro for selecting entire row from mouse cell selection | Excel Programming |