I already have a macro created for my worksheet where a keyboard short cut of "Ctrl+T" generates the next "ticket number" by adding 1 to the last number. For example, if the ticket number in Column C, Row 4 is 10902 then I would click Column C, Row 5 and press "Ctrl+T" shortcut and the ticket number 10903 would pop up. Here is the macro I am already using:
Sub NextTicket()
ActiveCell.Formula = "=MAX(C2:C" + CStr(ActiveCell.Row - 1) + ")+1"
ActiveCell.Formula = ActiveCell.Value 'Convert formula to a value
End Sub
The problem with this is that I did not write this macro, my co-worker did. Also, I am fairly new to working with macros so it is hard for me to decipher this own on my own. My ultimate goal is to double click the cell in that column and it automatically generates the next ticket number, rather than having to manually enter the short cut on the keyboard. Any suggestions?
Sub NextTicket()
ActiveCell.Formula = "=MAX(C2:C" + CStr(ActiveCell.Row - 1) + ")+1"
ActiveCell.Formula = ActiveCell.Value 'Convert formula to a value
End Sub
The problem with this is that I did not write this macro, my co-worker did. Also, I am fairly new to working with macros so it is hard for me to decipher this own on my own. My ultimate goal is to double click the cell in that column and it automatically generates the next ticket number, rather than having to manually enter the short cut on the keyboard. Any suggestions?