Memuat
Memuat
Automatic Serial Number and ID for wedding planner
0 views
As soon as an item is entered on a new row, column M receives a unique running ID like TRX-2026-0061. Column H gives a formula-based fallback ID.

Every transaction has a unique number to trace.
The real project file is available. It is not just the picture above: you get the working file with every formula in place. It can be downloaded after payment, and we send the download link by WhatsApp or email.
ZIP: .xlsx workbook + VBA macro module (.zip)
| Cell | Formula | What it does |
|---|---|---|
| H2 | =IF(B2="","","TRX-"&TEXT(A2,"yyyy")&"-"&TEXT(ROW()-1,"0000")) | Formula-based fallback ID (no macro). |
| J2 | =COUNTA(Data!M2:M5000) | Number of IDs issued by the macro in column M. |
| J3 | =COUNTA(Data!H2:H61) | Number of formula fallback IDs. |
The macro module is delivered as a separate Modul_Makro.bas file inside the ZIP. Import it through Alt+F11. A short excerpt:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim c As Range, last As Long, nomor As Long
If Intersect(Target, Me.Range("B2:B5000")) Is Nothing Then Exit Sub
Application.EnableEvents = False
For Each c In Intersect(Target, Me.Range("B2:B5000")).Cells
If c.Value <> "" And Me.Cells(c.Row, 13).Value = "" Then
last = Me.Cells(Me.Rows.Count, 13).End(xlUp).Row
If last < 2 Then
nomor = 1
Else
nomor = Val(Right(Me.Cells(last, 13).Value, 4)) + 1
End If
Me.Cells(c.Row, 13).Value = "TRX-" & Year(Date) & "-" & Format(nomor, "0000")
If Me.Cells(c.Row, 1).Value = "" Then Me.Cells(c.Row, 1).Value = Date
End If
Next c
Application.EnableEvents = True
End SubColumns of the Data sheet:
| Wedding Item | Price |
|---|---|
| Venue Rental | 25,000,000 |
| Catering per Plate | 85,000 |
| Stage Decoration | 12,000,000 |
| Bridal Makeup and Attire | 8,000,000 |
| Photographer and Videographer | 9,000,000 |
| Wedding Rings | 7,500,000 |
| Printed Invitations | 4,500 |
| MC and Entertainment | 3,500,000 |
| Guest Souvenirs | 6,500 |
| Wedding Organizer | 10,000,000 |
The sample data is synthetic.
Yes. The picture above is only a preview. After payment we send the download link of the real project file (a ZIP containing the .xlsx workbook and the macro module) by WhatsApp or email.
No. The sample data is synthetic and only shows how the formulas behave. Replace it with your own data and the formulas keep working.
Yes, as a separate order. Message us on WhatsApp with a short description of your columns and what you want to see.
Sample data is synthetic. Excel is a trademark of Microsoft Corporation.
Back to Excel portfolio