Automatically generate the next number when Worksheet on Open in Excel

Поделиться
HTML-код
  • Опубликовано: 26 июл 2024
  • Increment the number on a worksheet when open. Use a simple macro to increase the number with every open. Invoice numbers, P.O. numbers will increase so that a new number is generated every time the workbook is open. Check out my templates page for free and purchased templates www.easyexcelanswers.com/temp...
    code
    Private Sub WorkbooK_Open()
    Range(“B8”).value = Range(“B8”).value+1
    End sub
    For more help visit my website www.easyexcelanswers.com or email me at easyexcelanswers@gmail.com.
    Contact me regarding customizing this template for your needs.
    Click for online Excel Consulting www.calendly.com/easyexcelanswers
    I am able to provide online help on your computer at a reasonable rate.
    www.amazon.com/shop/barbhende...
    I use a Blue condenser Microphone to record my videos, here is the link
    amzn.to/37gyyGa
    Check out Crowdcast for creating your webinars
    app.linkmink.com/a/crowdcast/83
    If you need to buy Office 2019 follow
    amzn.to/2VX5dv8
    I use Tube Buddy to help promote my videos
    Check them out
    www.Tubebuddy.com/easyexcelan...
    Follow me on Facebook
    / easyexcel.answers
    TWEET THIS VIDEO • Automatically generate...
    Follow me on twitter
    easyexcelanswers
    IG @barbhendersonconsulting
    You can help and generate a translation to you own language
    ruclips.net/user/timedtext_cs_p...
    *this description may contain affiliate links. When you click them, I may receive a small commission at no extra cost to you. I only recommend products and services that I've used or have experience with.
  • ХоббиХобби

Комментарии • 56

  • @TJones-xz8wd
    @TJones-xz8wd 2 года назад +1

    Omg I have been looking for this for SOOOOOOOO LONG!!!!!! Thank you!!!!!!

  • @MELED99
    @MELED99 4 года назад +3

    Thank you so much. The best instruction on this subject that I've seen. Appreciate it!!

  • @basboels1783
    @basboels1783 3 года назад

    Thank you, that is perfect!!! Great help to auto number a workbook that is used by mutiple people and ensure every saved item has a unique number.

  • @prasadpatil7478
    @prasadpatil7478 2 года назад

    This explanation has been the most simplest and crystal clear to the point. Thank you so much.

  • @Cici-kf6zt
    @Cici-kf6zt 2 года назад

    I appreciate this tutorial and video that you created for us. This is such valuable information. Thank you, Barb!

  • @mari_dc
    @mari_dc 4 месяца назад

    Thank you for the clear and precise instructions. Just what I was looking for.

  • @LauryDepp
    @LauryDepp 2 года назад

    Love it. ! Simple , to the point. Thanks. I subscribed!

  • @aghashahstreams7440
    @aghashahstreams7440 4 года назад

    Quick and easy very good video

  • @sharonbowers4061
    @sharonbowers4061 3 года назад

    Thank you

  • @ronakhingu4948
    @ronakhingu4948 8 месяцев назад

    thank you

  • @aghashahstreams7440
    @aghashahstreams7440 4 года назад

    Does this work on the 2020 version?

  • @barrywalker1288
    @barrywalker1288 2 года назад

    Brilliant

  • @harshanayee353
    @harshanayee353 Год назад

    I'm new to computers, so a lot to learn.🙁

  • @avanishvinu
    @avanishvinu 4 года назад

    What if I want to increment when I create a new sheet? Can you please help with the code

    • @avanishvinu
      @avanishvinu 4 года назад

      New Sheet in the sense, if i click Ctrl and drag the sheet, it creates a copy. i need the increment in the new copied sheet. Old sheet shouldn't change

  • @LauryDepp
    @LauryDepp 2 года назад

    Question, my invoices start in 127. Already how can I do to start in the cell B8 but instead of 1.. from 127?? I'm training here.

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 года назад

      It is just a matter of change your field to "B8" in the code and insert 126 so that the first number will be 127.

  • @andrewlyon2707
    @andrewlyon2707 4 года назад

    I’m struggling with this one I’m using an excel invoice template and followed this as closely as possible but it keeps coming up as a bug in the code

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 года назад

      I recently made a new video on this topic. Maybe it will help. ruclips.net/video/VPKl5Hz7iXQ/видео.html

    • @andrewlyon2707
      @andrewlyon2707 4 года назад

      Barb Henderson thanks I’ll take a look it’s probably me being useless with computers lol

  • @mindihackett3755
    @mindihackett3755 Год назад

    I follow these instructions and it states I have a bug or it will automatically disable the macro. I have a feeling that I have a security setting that is not allowing the formula to work. Please help!

  • @dysontang3935
    @dysontang3935 4 года назад

    Hi,
    this video is great ao thank you but i am having trouble as I am using an alphanumberic number "SS15001" and would like it to go to "SS15002".
    How do I do this please?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  4 года назад

      Got it!
      Private Sub Workbook_Open()
      Dim alpha As String
      Dim numeric As Long
      alpha = Left(Range("B2"), 2)
      numeric = Val(Replace(Range("B2"), alpha, "")) + 1
      Range("B2") = alpha & Format(numeric, "00000")
      End Sub

  • @emmanuelasantesaforo8084
    @emmanuelasantesaforo8084 3 года назад

    its not working for me +

  • @ontaca
    @ontaca 2 года назад

    I want to know how to add certain number each month without typing it in , I mean is I would like to see my vacation hour add up every month automatically without typing it manually .

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  2 года назад +1

      This operation is designed to generate invoice number. You would need to create a code that was relative to the date

  • @gordonfarmer5058
    @gordonfarmer5058 3 года назад

    How do I access or view previous "work order"

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  3 года назад

      The thought is that you would save a work order when it was complete so you would look for a saved invoice.

    • @gordonfarmer5058
      @gordonfarmer5058 3 года назад

      @@BarbHendersonconsulting alright thanks I was just hoping it saved it automatically as the work order number. I really appreciate you helping out beginners like me.

  • @almaalhussni1661
    @almaalhussni1661 4 года назад

    WHAT IS THE CODE IF I WANT TO START FROM SPECIFIC# THEN +1.

  • @timbootes7086
    @timbootes7086 Год назад

    I want to do the same thing in a Word Table, but it doesnt like it when I put in the excel formula

  • @OhJunKun
    @OhJunKun Месяц назад

    Hi Barb Henderson,
    If i have generate the number on my report in my VBA. i have set private Workbook_open automatically generate the number when i open the workbook.
    How to write this condition in VBA when reopen existing workbook in the folder the number cannot be generated in the workbook?

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  Месяц назад

      I have not tested this but if you put a word into cell "B2" and used this code
      Private Sub Worksheet_Change(ByVal Target As Range)
      If Not Intersect(Target, Me.Range("b2")) Is Nothing Then
      Range(“B8”).value = Range(“B8”).value+1
      Application.EnableEvents = True
      End If
      End Sub
      it should work

    • @OhJunKun
      @OhJunKun Месяц назад

      @@BarbHendersonconsulting Hi, i think maybe you are misunderstand my question. i have set the vba code based on the video automatically number generate is works when i reopen the workbook, the number is automatic generated. i want to do such as reopen the workbook automatic generate the number and also not to automatic generate the number on same workbook. because i want to keep track the number of the same report. you have other chat platform to easy communicate ?

  • @castillochristech
    @castillochristech Год назад

    it's not working, I get a run-time error '1004' Method 'Range' of object'_Global' failed - then its asking me to END or DEBUG

    • @BarbHendersonconsulting
      @BarbHendersonconsulting  Год назад

      on the VBA window, tools ,references, I have these checked - Visual Basic for Applications - Microsoft Excel 16.0 Object Library-OLE Automation -Microsoft Office 16.0 Object Library

  • @WayneThompson-oh5bn
    @WayneThompson-oh5bn Год назад

    Didn't work for me. I get a message which says Global failed

  • @pratikmodi6440
    @pratikmodi6440 2 года назад

    Automatically generated next number when copy next sheet ???