Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automate cell selection


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Automate cell selection

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
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
Automate Selection kaholynn Excel Discussion (Misc queries) 4 January 1st 09 04:36 PM
Automate pivot table selection Steve Excel Discussion (Misc queries) 0 July 17th 08 11:34 AM
Automate selection of specific reference cells njg Excel Discussion (Misc queries) 0 February 26th 06 04:48 AM
Automate column selection Snoopy Setting up and Configuration of Excel 1 January 27th 06 03:26 PM
AUTOMATE DATE SELECTION, PRINT, PDF jlegoland4 Excel Programming 0 September 1st 04 07:17 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"