Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default teach me how to do range address syntax

I need some one to teach me a finer point of specifying range
addresses. I can do the simple stuff but I want to have a range
address that includes a constant and a variable like might be the case
in a loop. I've tried several approaches and I usually get an error
message ("compile error: expected: list separator or )") when I enter
the line. Here's a simple example of what I want to do:

For i = 1 to lastrow
Range("A" & i:"D" & i) = something
Next i

For each row in the loop set cells A, B, C and D to the same value.

Thanks for pushing me further down the learning curve!


John Keith

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default teach me how to do range address syntax

hi
you have a small syntax problem.
try this...
Range("A" & i & ":D" & i).Select

regards
FSt1

"John Keith" wrote:

I need some one to teach me a finer point of specifying range
addresses. I can do the simple stuff but I want to have a range
address that includes a constant and a variable like might be the case
in a loop. I've tried several approaches and I usually get an error
message ("compile error: expected: list separator or )") when I enter
the line. Here's a simple example of what I want to do:

For i = 1 to lastrow
Range("A" & i:"D" & i) = something
Next i

For each row in the loop set cells A, B, C and D to the same value.

Thanks for pushing me further down the learning curve!


John Keith


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default teach me how to do range address syntax

On Wed, 21 Jan 2009 22:15:01 -0800, FSt1
wrote:

hi
you have a small syntax problem.
try this...
Range("A" & i & ":D" & i).Select


Thank you! That was a combination I had not tried.


John Keith

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
How to create a range address with ADDRESS function? Steve McLeod Excel Worksheet Functions 1 December 18th 08 02:02 PM
Syntax to address ThisWorkbook.BuiltinDocumentProperties via Access Automation? [email protected] Excel Discussion (Misc queries) 0 June 24th 08 01:29 AM
How to use the 'if' - function? Pls teach me... Ms Hoo Excel Worksheet Functions 2 August 26th 06 11:39 AM
Target.Address syntax Coolboy55 Excel Worksheet Functions 3 August 23rd 05 12:23 AM
Is it possible to teach ones self VBA? Ron[_28_] Excel Programming 11 August 25th 04 09:01 PM


All times are GMT +1. The time now is 05:50 AM.

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"