Cell Selection in Macro

  • Thread starter Thread starter Nesara
  • Start date Start date
N

Nesara

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
 
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
 
Thank you for the solution.

Mike H said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top