VBA code to find highest no. in column to assign a serial no.

  • Hi,
    I need some help please.
    I have a macro recorded in a worksheet. It performs following actions,

    • Unprotect Worksheet.
    • Insert a row (Row No. 11)
    • Unhide row 8 & 9.
    • Copy row 8.
    • Paste row 8 in No. 11 (incl. conditional formatting, data lists, etc)
    • Add a serial no. to a11 by adding 1 in a12.
    • Hides row 8& 9.
    • Protect sheet.


    On item 6, I would like VBA to find highest no. in column A (A11 onwards) and then add a serial no. onto it.


    Code is pasted below,



    Apologies if it is a duplicate request.
    Any help in above will be appreciated.


    Many Thanks,

  • Code Tags Added
    Your post does not comply with our Forum RULES. Use code tags around code.


    Posting code between

    Code

    tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.


    Highlight your code and click the # icon at the top of your post window.


    (I have added them for you today. Please take a few minutes to read all Forum Rules and comply in the future.)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!