+ Reply to Thread
Results 1 to 2 of 2

Update cell by increment of 1 on opening and save as the new number

Hybrid View

SarahG123 Update cell by increment of 1... 03-06-2019, 07:03 AM
nigelog Re: Update cell by increment... 03-06-2019, 07:17 AM
  1. #1
    Registered User
    Join Date
    03-06-2019
    Location
    England
    MS-Off Ver
    Office 365
    Posts
    1

    Update cell by increment of 1 on opening and save as the new number

    Hello all,

    Disclaimer: I am totally new to macros and trying to teach myself here. So hoping that you might be able to advise me.

    I an creating a paying-in log. I would like the macro to update the log number and then save the document under this new number.

    E.g.
    Cell 1 = Paying in log
    Cell 2 = 1
    -------
    Cell 1 will remain constant.
    Cell 2 will update by 1 each time on opening, and then will be saved as a new document, using the information from cell 1 and combining it with cell 2. E.g. Paying in log 1

    Can anyone help?


    The form looks like this:

    Example excel.png

    Many thanks,

    Sarah

  2. #2
    Forum Expert nigelog's Avatar
    Join Date
    12-14-2007
    Location
    Cork, Ireland
    MS-Off Ver
    Office 365 Windows 10
    Posts
    2,293

    Re: Update cell by increment of 1 on opening and save as the new number

    Private Sub WorkBook_Open()
    
    With Sheets("Sheet1")
    .Cells(1, 4).Value = .Cells(1, 4).Value + 1
        ThisWorkbook.SaveAs ThisWorkbook.Path & Application.PathSeparator & .Cells(1, 3).Value & " " & .Cells(1, 4).Value & ".xlsm"
     End With
    End Sub
    Last edited by nigelog; 03-06-2019 at 07:27 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Increment Number Every Nth Cell
    By Mkaplan1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-26-2014, 02:03 PM
  2. Increment invoice number and clear/save
    By rjw29 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2013, 03:21 PM
  3. Need to auto increment and update PO # and save file as cells H7,J7, and A14
    By carson in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-08-2012, 01:35 PM
  4. opening another opened xcel,save to update and copy a specific column
    By roipatrick in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-25-2010, 09:41 PM
  5. cell number increment
    By edypat in forum Excel General
    Replies: 1
    Last Post: 11-24-2007, 05:27 PM
  6. how to increment number in a cell?
    By senceremre in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-15-2005, 10:58 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1