Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default activecell column to a given range

I've recently started doing some Excel programming after a gap
of about 4 years, I find I've forgotten a lot.

What's the syntax for this? The activecell is in a given column.
I want to go to the same column, but a different row, ie a particular
row in a named range "Column_Headings"

to put it another way, what I want to go is go to the column
heading of whichever column I'm in at the moment.

TIA


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default activecell column to a given range

Activesheet.cells(1,activecell.column).Select
or
activecell.entirecolumn.cells(1).Select

Peter Morris wrote:

I've recently started doing some Excel programming after a gap
of about 4 years, I find I've forgotten a lot.

What's the syntax for this? The activecell is in a given column.
I want to go to the same column, but a different row, ie a particular
row in a named range "Column_Headings"

to put it another way, what I want to go is go to the column
heading of whichever column I'm in at the moment.

TIA


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default activecell column to a given range


Peter Morris wrote:

I've recently started doing some Excel programming after a gap
of about 4 years, I find I've forgotten a lot.

What's the syntax for this? The activecell is in a given column.
I want to go to the same column, but a different row, ie a particular
row in a named range "Column_Headings"

to put it another way, what I want to go is go to the column
heading of whichever column I'm in at the moment.

TIA



"Dave Peterson" wrote in message
...
Activesheet.cells(1,activecell.column).Select
or
activecell.entirecolumn.cells(1).Select



No, the cell isn't neccesarily going to be in row 1.
Its going to be above a particular column of figures
but there may be stuff above it.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default activecell column to a given range

Do you know the row number to go to?

Activesheet.cells(###,activecell.column).Select

if you do, change ### to that row number.

Peter Morris wrote:

Peter Morris wrote:

I've recently started doing some Excel programming after a gap
of about 4 years, I find I've forgotten a lot.

What's the syntax for this? The activecell is in a given column.
I want to go to the same column, but a different row, ie a particular
row in a named range "Column_Headings"

to put it another way, what I want to go is go to the column
heading of whichever column I'm in at the moment.

TIA


"Dave Peterson" wrote in message
...
Activesheet.cells(1,activecell.column).Select
or
activecell.entirecolumn.cells(1).Select


No, the cell isn't neccesarily going to be in row 1.
Its going to be above a particular column of figures
but there may be stuff above it.


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default activecell column to a given range


"Dave Peterson" wrote in message
...
Do you know the row number to go to?



No, that's the point.

To be precise, I know the row number NOW, but
as I develop my code Imight move the cells to a different
location. I don't waant tohard code a specific row
number.

Cells in the row are a named range "column_headers"
I want the current column within that range. Or an
alternative way to do this.




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default activecell column to a given range

Ahhhh. I missed that part.

with activesheet
.cells(.range("column_headers").row,activecell.col umn).Select
end with




Peter Morris wrote:

"Dave Peterson" wrote in message
...
Do you know the row number to go to?


No, that's the point.

To be precise, I know the row number NOW, but
as I develop my code Imight move the cells to a different
location. I don't waant tohard code a specific row
number.

Cells in the row are a named range "column_headers"
I want the current column within that range. Or an
alternative way to do this.


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default activecell column to a given range

Sometimes, I don't read as carefully as I should. This was one (or 4) of those
times.

Dave Peterson wrote:

Ahhhh. I missed that part.

with activesheet
.cells(.range("column_headers").row,activecell.col umn).Select
end with

Peter Morris wrote:

"Dave Peterson" wrote in message
...
Do you know the row number to go to?


No, that's the point.

To be precise, I know the row number NOW, but
as I develop my code Imight move the cells to a different
location. I don't waant tohard code a specific row
number.

Cells in the row are a named range "column_headers"
I want the current column within that range. Or an
alternative way to do this.


--

Dave Peterson


--

Dave Peterson
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default activecell column to a given range


"Dave Peterson" wrote in message
...
Sometimes, I don't read as carefully as I should. This was one (or 4) of
those
times.

Dave Peterson wrote:

Ahhhh. I missed that part.

with activesheet
.cells(.range("column_headers").row,activecell.col umn).Select
end with



Thanks, that works.


  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default activecell column to a given range

And only after a half dozen messages! <vbg

Peter Morris wrote:

"Dave Peterson" wrote in message
...
Sometimes, I don't read as carefully as I should. This was one (or 4) of
those
times.

Dave Peterson wrote:

Ahhhh. I missed that part.

with activesheet
.cells(.range("column_headers").row,activecell.col umn).Select
end with


Thanks, that works.


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
If activecell.column = variable then activecell,offset (0,1) Battykoda via OfficeKB.com Excel Discussion (Misc queries) 1 October 2nd 07 08:05 PM
ActiveCell in a Range? Filo Excel Discussion (Misc queries) 3 May 22nd 07 09:52 PM
Define range with activecell [email protected] Excel Programming 3 April 25th 06 09:03 PM
Mark a range from activecell Ctech[_32_] Excel Programming 5 November 2nd 05 10:38 AM
Name of range containing ActiveCell? Ed Excel Programming 13 January 4th 05 12:55 AM


All times are GMT +1. The time now is 05:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"