+ Reply to Thread
Results 1 to 2 of 2

Date plus incrementing number

  1. #1
    Registered User
    Join Date
    07-19-2013
    Location
    South Carolina
    MS-Off Ver
    Office 2010
    Posts
    1

    Date plus incrementing number

    I have the following script that auto populates several fields on my spreadsheet when i enter data. In column B, I also need to have it put today's date plus a number. I need the numbers to start over each day. For instance:

    071913-001
    071913-002
    071913-003
    072013-001
    072013-002
    072013-003

    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column = 6 Then
    Application.EnableEvents = False
    Target.Offset(0, 2).Value = Date
    Target.Offset(0, 4).Value = "Open"

    Application.EnableEvents = True
    End If
    End Sub


    Any help is greatly appreciated!

    Thanks,
    Mike

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Date plus incrementing number

    Non VBA solution,

    See the attached file.

    dutch =ALS(A1="";"";TEKST(A1;"dd-mm-jjjj")&"-"&TEKST(AANTAL.ALS(A1:A1;A1);"000"))

    English =if(A1="","",TEXT(A1,"dd-mm-jjjj")&"-"&TEXT(Countif($A$1:$A1,$A1),"000"))
    Attached Files Attached Files
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

+ 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. Auto incrementing PO number
    By rackham in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 10-27-2011, 01:35 PM
  2. Replies: 6
    Last Post: 10-03-2011, 04:26 PM
  3. Incrementing invoice number
    By txturbo in forum Excel General
    Replies: 2
    Last Post: 04-22-2007, 10:30 PM
  4. Incrementing row number
    By den1s in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-09-2006, 11:10 AM
  5. Incrementing a formula by X number
    By Bowbender in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-21-2005, 11:14 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