LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default Need loop guidance

Hello, I need assistance with creating code for a loop (which i'm not good at
at all).

I have this code below that I'm only showing a portion of. I want to turn
this into a For Loop code because I have to do the below code from "SP1",
"Total1" through "SP30" and "Total30" so I'm looking at over 60 lines of code.

How can I trun this into a For i = 1 to 30 type code? Any help is appreciated.

Code:
SP1.Value = Sheets("data").Range("Line1SP").Value
Total1.Value = Sheets("data").Range("Line1tot").Value
SP2.Value = Sheets("data").Range("Line2SP").Value
Total2.Value = Sheets("data").Range("Line2tot").Value
SP3.Value = Sheets("data").Range("Line3SP").Value
Total3.Value = Sheets("data").Range("Line3tot").Value
SP4.Value = Sheets("data").Range("Line4SP").Value
Total4.Value = Sheets("data").Range("Line4tot").Value
 
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
statistics - guidance Duke Carey Excel Worksheet Functions 2 November 6th 08 09:46 PM
Need some guidance Buxton Excel Worksheet Functions 1 December 25th 07 09:11 PM
looking for logic guidance Bruce Excel Programming 1 February 17th 07 03:40 AM
After much help from this forum, I still some guidance... Petitboeuf Excel Discussion (Misc queries) 1 July 7th 06 12:54 PM
Architectural guidance, please Mike Excel Programming 1 April 26th 05 09:58 PM


All times are GMT +1. The time now is 09:50 PM.

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"