Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Clean up code using WITHs

Another way



Dim i As Integer
With Sheet2
.Cells(varRow, 1).Value = ActiveSheet.Range("G3").Value
.Cells(varRow, 2).Value = ActiveSheet.Range("G4").Value
.Cells(varRow, 3).Value = ActiveSheet.Range("Total").Value
For i = 4 To 8 Step 1
.Cells(varRow, i).Value = ActiveSheet.Cells(i + 7, "b").Value
Next i
For i = 9 To 13 Step 1
.Cells(varRow, i).Value = ActiveSheet.Cells(i + 2, "f").Value
Next i
End Wit

--
Message posted from http://www.ExcelForum.com

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
clean up code a little terilad Excel Discussion (Misc queries) 12 April 12th 10 07:35 PM
Clean Up Code - consolidate steps Frantic Excel-er Excel Discussion (Misc queries) 6 June 30th 05 03:40 PM
Trim function doesn't clean out ASCII Code 160 (Space) Ronald Dodge Excel Worksheet Functions 6 January 27th 05 03:48 AM
Plase help me clean up my code jasonsweeney[_14_] Excel Programming 1 January 22nd 04 07:47 PM
=clean(a1) news.verizon.net Excel Programming 2 August 25th 03 11:08 PM


All times are GMT +1. The time now is 02:06 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"