Restart Numbering - 08-26 to 09-01 format

Smokeyham

Board Regular
Joined
Feb 1, 2006
Messages
120
Office Version
  1. 365
Platform
  1. Windows
Hello,

I have a spreadsheet where I keep track of information for a bi-weekly payroll system. Most years there are 26 pay periods in the year.

I want to have the pay period number reset the suffix to "01" when it reaches 26. I also would like it to switch the prefix to the next year. Here is an example of what I am try to do:

08-25
08-26
09-01
09-02
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
If A1 = 08-25

in B1 and filled down

=TEXT(LEFT(A1,2)+(RIGHT(A1,2)="26"),"00")&"-"&IF(RIGHT(A1,2)="26","01",TEXT(RIGHT(A1,2)+1,"00"))
 
Upvote 0
If A1 = 08-25

in B1 and filled down

=TEXT(LEFT(A1,2)+(RIGHT(A1,2)="26"),"00")&"-"&IF(RIGHT(A1,2)="26","01",TEXT(RIGHT(A1,2)+1,"00"))

Thanks so much!

I might be missing something here, but what I did to make this work when copying downwards in Column B was to change the reference in cell B2 to reference cell B1 (as opposed to A2) and then copied downwards. It worked great then.
 
Upvote 0

Forum statistics

Threads
1,223,710
Messages
6,174,019
Members
452,542
Latest member
Bricklin

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