Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default selection of cell at the intersection of column B and the row ofwhatever cell is active

Hi

I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.

Any help would be appreciated.

Thank
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default selection of cell at the intersection of column B and the row of whatever cell is active

On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"
wrote:

Hi

I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.

Any help would be appreciated.

Thank


Try this macro

Sub select_B()
ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Åke
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default selection of cell at the intersection of column B and the row ofwhatever cell is active

On Jul 29, 1:31*pm, Lars-Åke Aspelin
wrote:
On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"

wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro

Sub select_B()
* *ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Åke


thanks that worked just like I wanted, I knew it had to be something
fairly simple
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default selection of cell at the intersection of column B and the row of whatever cell is active

Just so you can see there are usually more than one way to accomplish a goal
with code, here is another approach...

Sub SelectColumnB()
Intersect(Columns("B"), ActiveCell.EntireRow).Select
End Sub

--
Rick (MVP - Excel)


"A & S" wrote in message
...
On Jul 29, 1:31 pm, Lars-Åke Aspelin
wrote:
On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"

wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro

Sub select_B()
ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Åke


thanks that worked just like I wanted, I knew it had to be something
fairly simple

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default selection of cell at the intersection of column B and the row ofwhatever cell is active

On Jul 29, 1:31*pm, Lars-Åke Aspelin
wrote:
On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"

wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro

Sub select_B()
* *ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Åke


I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that title
instead of B

thanks


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default selection of cell at the intersection of column B and the row ofwhatever cell is active

On Jul 29, 2:17*pm, "Rick Rothstein"
wrote:
Just so you can see there are usually more than one way to accomplish a goal
with code, here is another approach...

Sub SelectColumnB()
* Intersect(Columns("B"), ActiveCell.EntireRow).Select
End Sub

--
Rick (MVP - Excel)

"A & S" wrote in ...
On Jul 29, 1:31 pm, Lars-Åke Aspelin
wrote:





On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"


wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro


Sub select_B()
ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub


Hope this helps / Lars-Åke


thanks that worked just like I wanted, I knew it had to be something
fairly simple- Hide quoted text -

- Show quoted text -


I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that
title
instead of B

thanks

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 913
Default selection of cell at the intersection of column B and the row of whatever cell is active

On Thu, 30 Jul 2009 07:03:11 -0700 (PDT), "A & S"
wrote:

On Jul 29, 1:31*pm, Lars-Åke Aspelin
wrote:
On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"

wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro

Sub select_B()
* *ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Åke


I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that title
instead of B

thanks



Yes, try this macro

Sub select_description()
ActiveSheet.Cells(ActiveCell.Row,
Range("Description").Column).Select
End Sub

Hope this helps / Lars-Åke

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default selection of cell at the intersection of column B and the row of whatever cell is active

Try this...

Sub SelectColumnB()
Intersect(Range("Description"), ActiveCell.EntireRow).Select
End Sub

--
Rick (MVP - Excel)


"A & S" wrote in message
...
On Jul 29, 2:17 pm, "Rick Rothstein"
wrote:
Just so you can see there are usually more than one way to accomplish a
goal
with code, here is another approach...

Sub SelectColumnB()
Intersect(Columns("B"), ActiveCell.EntireRow).Select
End Sub

--
Rick (MVP - Excel)

"A & S" wrote in
...
On Jul 29, 1:31 pm, Lars-Åke Aspelin
wrote:





On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"


wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro


Sub select_B()
ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub


Hope this helps / Lars-Åke


thanks that worked just like I wanted, I knew it had to be something
fairly simple- Hide quoted text -

- Show quoted text -


I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that
title
instead of B

thanks

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 272
Default selection of cell at the intersection of column B and the row

You can also just type into the name box one of these:
"c2 r" or "Description r" or "index(description,row())"

The equivalent in VBA is: application.goto "Description r" , etc.
An advantage is that you can use the macro recorder to generate the code.

"A & S" wrote:

On Jul 29, 1:31 pm, Lars-Ã…ke Aspelin
wrote:
On Wed, 29 Jul 2009 10:24:03 -0700 (PDT), "A & S"

wrote:
Hi


I have been messing around for several hours to try and figure out how
to do this but can never get quite what I want. I need to be able to
run the macro and have it select a cell by using the row of the
current active cell and column B. say for instance cell D5 is active,
I would want the macro to select cell B5, if F15 were active then I
would want it to select B15.


Any help would be appreciated.


Thank


Try this macro

Sub select_B()
ActiveSheet.Cells(ActiveCell.Row, "B").Select
End Sub

Hope this helps / Lars-Ã…ke


I am now wondering, I highlighted the entire column B and typed
Description into the name box is there a way that I can use that title
instead of B

thanks

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
Move active cell through current selection Mike King Excel Programming 4 July 7th 09 08:31 PM
Selection starting from active cell Ronald Dodge Excel Discussion (Misc queries) 3 October 10th 06 12:46 AM
Change from Column Selection to Cell Selection Lil Pun[_16_] Excel Programming 4 June 16th 06 10:38 PM
Active cell, row, column, worksheet, etc sip8316 Excel Programming 2 June 6th 05 02:29 PM
Cell selection in non-active sheet Otto Moehrbach[_6_] Excel Programming 1 July 16th 04 05:16 PM


All times are GMT +1. The time now is 07:46 PM.

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"