Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cell Selection in Macro

Hi all

i am having row number and column number (for example row = 4 and column =
20), pls tell me the method or syntax to select the cell (row = 4 and column
= 20)
I have used Range("row:col").select, but it is not working.

second one is how to store the Activecell content
I have used the follwing code for the same
Dim Ac1 As Application
Ac1.Activecell = Activecell.Offset(0,10).Range("A1")

But it is also not working
Pls help me
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Cell Selection in Macro

Cells(4, 20).Select
--
Gary''s Student - gsnu200797
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Cell Selection in Macro

Try this

rRow = 4
rColumn = 20
Cells(rRow, rColumn).Select

or
Cells(4, 20).Select

I'm not entirely sure by what you mean for the second part of the question
but maybe this

myvalue = ActiveCell.Value
myvalue1 = ActiveCell.Offset(1, 2).Value

Mike

"Nesara" wrote:

Hi all

i am having row number and column number (for example row = 4 and column =
20), pls tell me the method or syntax to select the cell (row = 4 and column
= 20)
I have used Range("row:col").select, but it is not working.

second one is how to store the Activecell content
I have used the follwing code for the same
Dim Ac1 As Application
Ac1.Activecell = Activecell.Offset(0,10).Range("A1")

But it is also not working
Pls help me

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cell Selection in Macro

Thank you .

"Gary''s Student" wrote:

Cells(4, 20).Select
--
Gary''s Student - gsnu200797

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Cell Selection in Macro

Thank you for the solution.

"Mike H" wrote:

Try this

rRow = 4
rColumn = 20
Cells(rRow, rColumn).Select

or
Cells(4, 20).Select

I'm not entirely sure by what you mean for the second part of the question
but maybe this

myvalue = ActiveCell.Value
myvalue1 = ActiveCell.Offset(1, 2).Value

Mike

"Nesara" wrote:

Hi all

i am having row number and column number (for example row = 4 and column =
20), pls tell me the method or syntax to select the cell (row = 4 and column
= 20)
I have used Range("row:col").select, but it is not working.

second one is how to store the Activecell content
I have used the follwing code for the same
Dim Ac1 As Application
Ac1.Activecell = Activecell.Offset(0,10).Range("A1")

But it is also not working
Pls help me

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
Trying to get a macro to run when cell selection changes. Bob Arnett Excel Programming 2 August 1st 08 06:51 PM
Macro - Dynamic cell selection Chris Excel Discussion (Misc queries) 1 January 11th 06 01:48 PM
Macro help on Cell Selection Nigel Excel Programming 3 April 27th 05 12:26 PM
Cell selection in a macro GatheringShadow[_2_] Excel Programming 0 October 21st 04 01:45 PM
Cell selection in a macro GatheringShadow Excel Programming 2 October 21st 04 12:33 AM


All times are GMT +1. The time now is 09:26 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"