Help with formula to keep leading zero in cell - cant format as date

lollipopsicle76

New Member
Joined
Dec 9, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

A bit of background - i am creating a spreadsheet to create barcodes which are to assist with scanning our drivers daily worksheets. The barcodes are printed on label sheets which are 33 labels to a page, so i need 33 labels per driver.

I have set up my formulas to get the information i need, but i have a issue with the "date" format dropping the leading zero. The problem i have with making it a date format is that there is no 32nd or 33rd of the month.

Please have a look at the tab named Barcode, i require column F to be in the format DD/MM/YYYY from the 1st to the 33rd label, it then restarts for the next driver entry.

Bulk Barcodes - Copy.xlsx
ABCDEFGHI
1"*DW- & [number] & "-" & [dte] & "*"01/12/202433/11/2024
2
3*DW-AMAN11220241/12/2024*DW-AMAN-1/12/2024*DW Ant Man 1/12/2024
4*DW-AMAN21220242/12/2024*DW-AMAN-2/12/2024*DW Ant Man 2/12/2024
5*DW-AMAN31220243/12/2024*DW-AMAN-3/12/2024*DW Ant Man 3/12/2024
6*DW-AMAN41220244/12/2024*DW-AMAN-4/12/2024*DW Ant Man 4/12/2024
7*DW-AMAN51220245/12/2024*DW-AMAN-5/12/2024*DW Ant Man 5/12/2024
8*DW-AMAN61220246/12/2024*DW-AMAN-6/12/2024*DW Ant Man 6/12/2024
9*DW-AMAN71220247/12/2024*DW-AMAN-7/12/2024*DW Ant Man 7/12/2024
10*DW-AMAN81220248/12/2024*DW-AMAN-8/12/2024*DW Ant Man 8/12/2024
11*DW-AMAN91220249/12/2024*DW-AMAN-9/12/2024*DW Ant Man 9/12/2024
12*DW-AMAN1012202410/12/2024*DW-AMAN-10/12/2024*DW Ant Man 10/12/2024
13*DW-AMAN1112202411/12/2024*DW-AMAN-11/12/2024*DW Ant Man 11/12/2024
14*DW-AMAN1212202412/12/2024*DW-AMAN-12/12/2024*DW Ant Man 12/12/2024
15*DW-AMAN1312202413/12/2024*DW-AMAN-13/12/2024*DW Ant Man 13/12/2024
16*DW-AMAN1412202414/12/2024*DW-AMAN-14/12/2024*DW Ant Man 14/12/2024
17*DW-AMAN1512202415/12/2024*DW-AMAN-15/12/2024*DW Ant Man 15/12/2024
18*DW-AMAN1612202416/12/2024*DW-AMAN-16/12/2024*DW Ant Man 16/12/2024
19*DW-AMAN1712202417/12/2024*DW-AMAN-17/12/2024*DW Ant Man 17/12/2024
20*DW-AMAN1812202418/12/2024*DW-AMAN-18/12/2024*DW Ant Man 18/12/2024
21*DW-AMAN1912202419/12/2024*DW-AMAN-19/12/2024*DW Ant Man 19/12/2024
22*DW-AMAN2012202420/12/2024*DW-AMAN-20/12/2024*DW Ant Man 20/12/2024
23*DW-AMAN2112202421/12/2024*DW-AMAN-21/12/2024*DW Ant Man 21/12/2024
24*DW-AMAN2212202422/12/2024*DW-AMAN-22/12/2024*DW Ant Man 22/12/2024
25*DW-AMAN2312202423/12/2024*DW-AMAN-23/12/2024*DW Ant Man 23/12/2024
26*DW-AMAN2412202424/12/2024*DW-AMAN-24/12/2024*DW Ant Man 24/12/2024
27*DW-AMAN2512202425/12/2024*DW-AMAN-25/12/2024*DW Ant Man 25/12/2024
28*DW-AMAN2612202426/12/2024*DW-AMAN-26/12/2024*DW Ant Man 26/12/2024
29*DW-AMAN2712202427/12/2024*DW-AMAN-27/12/2024*DW Ant Man 27/12/2024
30*DW-AMAN2812202428/12/2024*DW-AMAN-28/12/2024*DW Ant Man 28/12/2024
31*DW-AMAN2912202429/12/2024*DW-AMAN-29/12/2024*DW Ant Man 29/12/2024
32*DW-AMAN3012202430/12/2024*DW-AMAN-30/12/2024*DW Ant Man 30/12/2024
33*DW-AMAN3112202431/12/2024*DW-AMAN-31/12/2024*DW Ant Man 31/12/2024
34*DW-AMAN3212202432/12/2024*DW-AMAN-32/12/2024*DW Ant Man 32/12/2024
35*DW-AMAN3312202433/12/2024*DW-AMAN-33/12/2024*DW Ant Man 33/12/2024
36*DW-BBANNE11220241/12/2024*DW-BBANNE-1/12/2024*DW Bruce Banner 1/12/2024
37*DW-BBANNE21220242/12/2024*DW-BBANNE-2/12/2024*DW Bruce Banner 2/12/2024
38*DW-BBANNE31220243/12/2024*DW-BBANNE-3/12/2024*DW Bruce Banner 3/12/2024
Barcode
Cell Formulas
RangeFormula
G1G1='Driver Data'!I2
A3:A38A3="*DW-"
B3:B38B3=IF(B2="",'Driver Data'!$G$2,IF(C3="","",IF(C3=1,INDEX('Driver Data'!G:G,MATCH(Barcode!B2,'Driver Data'!G:G,0)+1,1),Barcode!B2)))
D3D3=MONTH(G1)
E3E3=YEAR(G1)
F3:F38F3=C3&"/"&D3&"/"&E3
G3:G38G3=A3&B3&"-"&C3&"/"&D3&"/"&E3&"*"
C4:C34C4=IF(C3+1=33,1,C3+1)
D4:E38D4=D3
C35:C38C35=IF(C34+1=34,1,C34+1)
I3:I38I3="DW "&VLOOKUP(B3,'Driver Data'!G:H,2,FALSE)&" "&Barcode!F3
 

Excel Facts

What is =ROMAN(40) in Excel?
The Roman numeral for 40 is XL. Bill "MrExcel" Jelen's 40th book was called MrExcel XL.
Try this in F3
Excel Formula:
=TEXTJOIN("/",,TEXT(C3:D3,"00"),E3)
 
Upvote 0
What you are doing is really confusing. Are you trying to make something look like a date that is not really a date? Something like putting a sequence number as the first number, instead of a day?

If your question boils down to needing a leading zero in the first segment of your number, then modify the formula in column F to be

Rich (BB code):
=TEXT(C3,"00")&"/"&D3&"/"&E3
 
Upvote 0
What you are doing is really confusing. Are you trying to make something look like a date that is not really a date? Something like putting a sequence number as the first number, instead of a day?

If your question boils down to needing a leading zero in the first segment of your number, then modify the formula in column F to be

Rich (BB code):
=TEXT(C3,"00")&"/"&D3&"/"&E3
Thanks for your reply. It needs to be in DD/MM/YYYY format for the correct barcode language - however there are 33 labels per page in a mail merge doc, and i don't want to begin the next driver entry on the bottom of the prior page - hence the 32nd and 33rd of the month.

The issue i have is using text in column C, means my formula in column B doesn't.
 
Upvote 0
I am still not following what you need.

You have shown us your current data. Please show your desired result.
 
Upvote 0

Forum statistics

Threads
1,224,504
Messages
6,179,142
Members
452,892
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top