G
Guest
Tom
Unfortunatley the code maynot be at the bottom because we have a number of
differenct code make-ups. Is there anyway of doing the below if the code sit
in the middle of the spreadsheet i.e using an if statement...
Thanks for trying
Marcus
Unfortunatley the code maynot be at the bottom because we have a number of
differenct code make-ups. Is there anyway of doing the below if the code sit
in the middle of the spreadsheet i.e using an if statement...
Thanks for trying
Marcus
Was this post helpful to youTom Ogilvy said:Assuming the last populated cell would contain that number
Dim rng as Range, nextNumber as Long
set rng = Cells(rows.count,"A").End(xlup)
nextNumber = "SAT" & clng(Right(rng,len(rng)-3)) + 1
msgbox nextNumber