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 Shorting code

Is there a way to short this code?

Sub AddingClients()
Dim Startcell As Range
Dim shtOffset As Integer

Set Startcell = shtClient.Range("b2")
shtOffset = shtClient.Range("a1").Value
Startcell.Offset(shtOffset, 0) = shtInput.Range("c16")
Startcell.Offset(shtOffset, 1) = shtInput.Range("c4")
Startcell.Offset(shtOffset, 2) = shtInput.Range("c15")
Startcell.Offset(shtOffset, 3) = shtInput.Range("c17")
Startcell.Offset(shtOffset, 4) = shtInput.Range("c18")
Startcell.Offset(shtOffset, 5) = shtInput.Range("c5")
Startcell.Offset(shtOffset, 6) = shtInput.Range("c9")
Startcell.Offset(shtOffset, 7) = shtInput.Range("c10")
Startcell.Offset(shtOffset, 8) = shtInput.Range("c11")
Startcell.Offset(shtOffset, 9) = shtInput.Range("c20")
Startcell.Offset(shtOffset, 10) = shtInput.Range("c21")
Startcell.Offset(shtOffset, 11) = shtInput.Range("c23")
Startcell.Offset(shtOffset, 12) = shtInput.Range("c25")
Startcell.Offset(shtOffset, 13) = shtInput.Range("c26")
Startcell.Offset(shtOffset, 14) = shtInput.Range("c29")
Startcell.Offset(shtOffset, 15) = shtInput.Range("c30")
Startcell.Offset(shtOffset, 16) = shtInput.Range("c31")
Startcell.Offset(shtOffset, 17) = shtInput.Range("c32")
End Sub


--
Wag more, bark less
 
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
split post code (zip code) out of cell that includes full address Concord Excel Discussion (Misc queries) 4 October 15th 09 06:59 PM
Shorting the Code Keith[_19_] Excel Programming 3 February 5th 08 08:22 PM
Shorten code to apply to all sheets except a few, instead of individually naming them, and later adding to code. Corey Excel Programming 3 December 11th 06 05:14 AM
Protect Sheet with code, but then code will not Paste error. How do i get around this. Please read for explainations.... Corey Excel Programming 4 November 25th 06 04:57 AM
operator statements, shorting when reusing one of the statements? KR Excel Programming 1 August 4th 05 06:20 PM


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