Hi, I'm tying to add some values to a worksheet - some are picked off another worksheet and some are constants e.g. G The code below goes into error when trying to add the constants. Can you tell me what is the correct syntax to use to be able to add these constant values? thanks, Neil
'Loop through data adding values
For i = 1 To NoRowsToInsert 'For number or rows to add from "MemDataLog"
Cells(j, 1).EntireRow.Insert 'Insert row starting in next row down from last row on "MainData"
WSD1.Cells(j, 1).Value = WSD.Cells(k, 1).Value
WDS1.Cells(j,2) = "G" 'Goes into ERROR
WDS1.Cells(j, 3).Value = "1" 'Goes into ERROR
WDS1.Cells(j, 4).Value = "Members" 'Goes into ERROR
WDS1.Cells(j, 5).Value = "Subs" 'Goes into ERROR
WSD1.Cells(j, 6).Value = WSD.Cells(k, 2).Value
WSD1.Cells(j, 7).Value = WSD.Cells(k, 3).Value & " " & WSD.Cells(k, 4)
WSD1.Cells(j, 9).Value = WSD.Cells(k, 6).Value
j = j + 1
k = k + 1
Next i
Bookmarks