macro to generate next number
On Tue, 9 Mar 2010 13:26:01 -0800, Mike H
wrote:
A macro it is then
Sub Sonic()
Dim LastRow As Long
Set SrcSht = Sheets("Sheet2")
Set DstSht = Sheets("Sheet1")
LastRow = SrcSht.Cells(Cells.Rows.Count, "A").End(xlUp).Row
DstSht.Range("A1").Value = SrcSht.Range("A" & LastRow)
End Sub
+1 should be added at the end of the last statement like this:
DstSht.Range("A1").Value = SrcSht.Range("A" & LastRow) + 1
Lars-Åke
|