Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() 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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Automate Selection | Excel Discussion (Misc queries) | |||
Automate pivot table selection | Excel Discussion (Misc queries) | |||
Automate selection of specific reference cells | Excel Discussion (Misc queries) | |||
Automate column selection | Setting up and Configuration of Excel | |||
AUTOMATE DATE SELECTION, PRINT, PDF | Excel Programming |