ppleasebob
Board Regular
- Joined
- Dec 23, 2002
- Messages
- 145
I have used the following code, as provided on this board for someone else,
Sub Job_Number()
Dim Startcell As Range
' The fist job number cell
Set Startcell = Range("A10")
If IsEmpty(Startcell) Then
' First Job number
Startcell = 1
Else
' Next job number
With Cells(Rows.Count, Startcell.Column).End(xlUp)
.Offset(1).Value = .Value + 1
End With
End If
End Sub
Can you suggest how I then copy the number that was generated above and paste it into Cell D5 on sheet named "Main"
Thanks for your assistance in advance
bob
Sub Job_Number()
Dim Startcell As Range
' The fist job number cell
Set Startcell = Range("A10")
If IsEmpty(Startcell) Then
' First Job number
Startcell = 1
Else
' Next job number
With Cells(Rows.Count, Startcell.Column).End(xlUp)
.Offset(1).Value = .Value + 1
End With
End If
End Sub
Can you suggest how I then copy the number that was generated above and paste it into Cell D5 on sheet named "Main"
Thanks for your assistance in advance
bob