PC Review


Reply
Thread Tools Rate Thread

Cell Selection in Macro

 
 
Nesara
Guest
Posts: n/a
 
      4th Aug 2008
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 With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      4th Aug 2008
Cells(4, 20).Select
--
Gary''s Student - gsnu200797
 
Reply With Quote
 
Mike H
Guest
Posts: n/a
 
      4th Aug 2008
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 With Quote
 
Nesara
Guest
Posts: n/a
 
      4th Aug 2008
Thank you .

"Gary''s Student" wrote:

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

 
Reply With Quote
 
Nesara
Guest
Posts: n/a
 
      4th Aug 2008
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to get a macro to run when cell selection changes. Bob Arnett Microsoft Excel Programming 2 1st Aug 2008 06:51 PM
Macro for cell selection starting with Last Cell =?Utf-8?B?VmFsZXJpZQ==?= Microsoft Excel Worksheet Functions 4 9th Dec 2005 08:25 PM
Macro help on Cell Selection =?Utf-8?B?TmlnZWw=?= Microsoft Excel Programming 3 27th Apr 2005 12:26 PM
Cell selection in a macro GatheringShadow Microsoft Excel Programming 0 21st Oct 2004 01:45 PM
macro - cell selection taiariol Microsoft Excel Worksheet Functions 4 25th Oct 2003 09:10 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:56 AM.