PC Review


Reply
Thread Tools Rate Thread

Automate cell selection

 
 
mayanklal
Guest
Posts: n/a
 
      12th Jun 2006

Hi,
How do I automate cell selection? For example if I want to select cell
A1,C1 and E1 then A2,C2,E2 and so on,each time using the data stored i
these cells.

Thanks,
Mayank

--
mayankla
-----------------------------------------------------------------------
mayanklal's Profile: http://www.excelforum.com/member.php...fo&userid=3523
View this thread: http://www.excelforum.com/showthread.php?threadid=55103

 
Reply With Quote
 
 
 
 
=?Utf-8?B?VG9tIE9naWx2eQ==?=
Guest
Posts: n/a
 
      12th Jun 2006
Sub DemoApproach()
Dim i As Long, rng As Range
Dim cell As Range, sStr As String
For i = 1 To 10
Set rng = Cells(i, 1).Range("A1,C1,E1")
' msgbox rng.Address
For Each cell In rng
sStr = sStr & cell.Address(0, 0) & ","
Next
sStr = Left(sStr, Len(sStr) - 1)
sStr = sStr & vbNewLine
Next
MsgBox sStr
End Sub

--
Regards,
Tom Ogilvy

"mayanklal" wrote:

>
> Hi,
> How do I automate cell selection? For example if I want to select cells
> A1,C1 and E1 then A2,C2,E2 and so on,each time using the data stored in
> these cells.
>
> Thanks,
> Mayank.
>
>
> --
> mayanklal
> ------------------------------------------------------------------------
> mayanklal's Profile: http://www.excelforum.com/member.php...o&userid=35236
> View this thread: http://www.excelforum.com/showthread...hreadid=551035
>
>

 
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
Automate Selection kaholynn Microsoft Excel Misc 4 1st Jan 2009 04:36 PM
Automate attachment selection Padds Microsoft Outlook Form Programming 12 15th May 2008 05:03 PM
Automate column selection =?Utf-8?B?U25vb3B5?= Microsoft Excel Setup 1 27th Jan 2006 03:26 PM
How to automate contact selection jpottsx1@gmail.com Microsoft Outlook VBA Programming 1 4th Nov 2005 06:50 PM
AUTOMATE DATE SELECTION, PRINT, PDF jlegoland4 Microsoft Excel Programming 0 1st Sep 2004 07:17 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:55 AM.