Formula for SEQUENCE with Text in it and a leading zero

WhatTheF

New Member
Joined
Feb 25, 2025
Messages
5
Office Version
  1. 2021
Platform
  1. Windows
I've been looking for a almost two hours on how to do this, and everything I've found is all about Dates, or has me using the AutoFill/Pull Down function. I'm not working with dates, I'm building a list of "Intake Numbers" for a wildlife rehabilitation. When they get animals in, they record date and time, species, and a bunch of other information. However, there are multiple locations and people doing intake. There's not reliable means of issuing the state required Intake Number without potential overlap while the animals are being processed in.

What I need is a formula that, at the end of each day, when the daily total number of intakes is put into A1, it generates a sequence with Text in the beginning (), the year, which is listed in another cell, K1, and the Quarter (M1), listed numerically. If A1 is 35, then the formula will generate 35 rows of H1-K1-M1[Q1= "1", Q2= "2", Q3= "3". Q4= "4")-01[through whatever number is listed in A1]. I have filled out the Mini Sheet below with the information as it will appear, basically, on the form.

Here's the code I've used to get where I'm at, but it doesn't list leading zero(s), which I need, since it looks like it's starting at "11"/:21/31/41 instead of "101"/"201"/"301"/"401", and it looks like we've missed about 100 animals when we get past the ninth intake...

=IFS($M$1="Q1",(H1&"-"&K1&"-1"&SEQUENCE(A1)),
$M$1="Q2",(H1&"-"&K1&"-2"&SEQUENCE(A1)),
$M$1="Q3",(H1&"-"&K1&"-3"&SEQUENCE(A1)),
$M$1="Q4",(H1&"-"&K1&"-4"&SEQUENCE(A1)))

(Yes, I know I write my formulas all spaced out and big! I'm very dyslexic, though, and this is the only way I can actually manage to read them!)

I appreciate your help!

Book1
ABCDEFGHIJKLMN
1035Fish and Game Conservation Wildlife Rehabilitation Permit Quarterly ReportPERM-427102023Q1
2SpeciesUnique IdentificationAgeSexIntake DateIntake MethodCollection CountyCollection LatitudeCollection LongitudeCollection AddressFacility Number of OriginUnique Identification2Disposition DateDisposition Method
3Virginia OpossumPERM-42710-2023-11ADULTMALE1/1/23PUBLIC TURN INDADEPERM-42710N/A2/28/2023RELEASE
4PERM-42710-2023-12
5PERM-42710-2023-13
6PERM-42710-2023-14
7PERM-42710-2023-15
8PERM-42710-2023-16
Sheet1
Cell Formulas
RangeFormula
B3:B37B3=IFS($M$1="Q1",(H1&"-"&K1&"-1"&SEQUENCE(A1)), $M$1="Q2",(H1&"-"&K1&"-2"&SEQUENCE(A1)), $M$1="Q3",(H1&"-"&K1&"-3"&SEQUENCE(A1)), $M$1="Q4",(H1&"-"&K1&"-4"&SEQUENCE(A1)))
Dynamic array formulas.
Cells with Data Validation
CellAllowCriteria
H3:H37Whole numberbetween 25 and 36
I3:I37Whole numberbetween -107 and -93
J3:J37Any value
K3:K37Any value
L3:L37Any value
M3:M37Datebetween 1/1/2015 and 12/31/2025
B3:B37Any value
C3Any value
D3Any value
E3:E37Datebetween 1/1/2010 and 12/31/2025
C4:C37ListAdult,Young,Unknown
D4:D37ListFemale,Male,Unknown
 
How about
Excel Formula:
=H1&"-"&K1&"-"&RIGHT(M1)&TEXT(SEQUENCE(A1),REPT(0,LEN(A1)))
 
Upvote 0

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