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: 141
Default Copying From One Sheet to another Q

I have this loop code below which copies from sheet "Coda Template" to sheet
"Coda", but it debugs at the line below and I don't know why

Range("a" & IngOutY) = Worksheets("Coda Template").Range("A" & IngPosY)

Appreciate any input

Thanks


Dim lngPosY As Long ' Input Cell Number
Dim lngOutY As Long ' Output Cell Number
Dim strSheetName As String ' Input Sheet Name

Dim oWS As Worksheet
Dim i As Long
Dim sName As String
Dim fCreated As Boolean


Sheets("Coda").Select


lngPosY = 2 ' Starting row on starting sheet

Range("A1") = "Document_Number"
Range("B1") = "Line_Number"
Range("C1") = "Document_Type"
Range("D1") = "Document_date"
Range("E1") = "Nominal"
Range("F1") = "Subaccount"
Range("G1") = "Level3"
Range("H1") = "Document_Value"
Range("I1") = "Document_Year"
Range("J1") = "Document_Period"
Range("K1") = "External_Text"
Range("L1") = "Quantity_1"
Range("M1") = "Description"


IngOutY = 2

Do While Len(Worksheets("Coda Template").Range("A" & lngPosY)) 0
Range("a" & IngOutY) = Worksheets("Coda Template").Range("A" &
IngPosY)
Range("B" & IngOutY) = Worksheets("Coda Template").Range("B" &
IngPosY)
Range("C" & IngOutY) = Worksheets("Coda Template").Range("C" &
IngPosY)
Range("D" & IngOutY) = Worksheets("Coda Template").Range("D" &
IngPosY)
Range("E" & IngOutY) = Worksheets("Coda Template").Range("E" &
IngPosY)
Range("F" & IngOutY) = Worksheets("Coda Template").Range("F" &
IngPosY)
Range("G" & IngOutY) = Worksheets("Coda Template").Range("G" &
IngPosY)
Range("H" & IngOutY) = Round(Worksheets("Coda Template").Range("H" &
IngPosY), 2)
Range("I" & IngOutY) = Worksheets("Coda Template").Range("I" &
IngPosY)
Range("J" & IngOutY) = Worksheets("Coda Template").Range("J" &
IngPosY)
Range("K" & IngOutY) = Worksheets("Coda Template").Range("K" &
IngPosY)
Range("L" & IngOutY) = Worksheets("Coda Template").Range("L" &
IngPosY)
Range("M" & IngOutY) = Worksheets("Coda Template").Range("M" &
IngPosY)


IngPosY = IngPosY + 1
IngOutY = IngOutY + 1

Loop


 
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
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
Copying the repeated data of the previous sheet to the next sheet Sasikiran Excel Discussion (Misc queries) 1 September 25th 07 03:18 PM
Dynamic column chart - copying from Sheet to Sheet. Marko Pinteric Charts and Charting in Excel 1 April 10th 06 12:57 PM
Copying cells from on sheet to another sheet (via sheet module) CRayF Excel Programming 6 September 20th 05 08:58 PM
2 questions, copying data from sheet to sheet and assigning macro Boris Excel Worksheet Functions 0 December 16th 04 06:11 PM


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