Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default What is the proper syntex for .cells or .range ?

Hi All
I am trying to read the array (m1:O1) in a Range command

using a for next loop where 'gm' is the incrementor
For gm =1 to 10

need to convert .Range("M1:O1") to increment .Range(gm,13:gm,15)
or .Cells(gm,13:gm,15)
neither seems to get past the debugger.
Thanks for any guidance !
Chris

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default What is the proper syntex for .cells or .range ?

On 27 Maj, 04:11, cgnotrom wrote:
Hi All
I am trying to read the array (m1:O1) in a Range command

using a for next loop where * 'gm' is the incrementor
For gm =1 to 10

need to convert *.Range("M1:O1") to increment .Range(gm,13:gm,15)
or *.Cells(gm,13:gm,15)
neither seems to get past the debugger.
Thanks for any guidance !
Chris


Hi Chris

Here's a way to do it:

Dim TargetRange As Range
Set TargetRange = Range("M1:O10")

For Each c In TargetRange
MsgBox c.Value
Next

Regards,
Per
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
Proper syntex to use jannie Excel Discussion (Misc queries) 1 February 10th 10 08:26 PM
Can anyone tell me the proper code to copy a range... Steel Works, Inc. Excel Programming 1 March 13th 07 12:24 AM
Syntex Error ?? Paul Cooke Excel Discussion (Misc queries) 4 December 9th 05 01:54 PM
Please help to correct syntex error james Excel Programming 4 February 9th 05 03:15 AM
What syntex to find text Robert Christie[_3_] Excel Programming 2 January 24th 05 04:53 AM


All times are GMT +1. The time now is 08:36 PM.

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

About Us

"It's about Microsoft Excel"