How to add dates and letters with letters following each other.

Du Toit

New Member
Joined
Nov 28, 2024
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Hi there.

I am working on a bit of automation.
Lets start with the result that I want.
i need this bellow to auto generate when I drag a cell down.

DS2024/11/28A
DS2024/11/28B
DS2024/11/28C
DS2024/11/28D
DS2024/11/28E

how I do t now is I have the DS part and the Date auto filling from a fixed cell will put the formula bellow. " it is tailored to my sheet"
=$E$2&TEXT($E$3;"yyyy/mm/dd")&TEXT("A";)

E2 just has the letters "DS" in it.

what i am not able to figure out is to make the A at the end turn to a B if i drag the cell down.

i also need it to restart at A if the E3 cell changes to the next day. " E3 =today() "

i hope this is possible.


Book1.xlsx
ABCDE
1
2DS
32024-11-28
4DS2024/11/28A
5
6
Sheet1
Cell Formulas
RangeFormula
E3E3=TODAY()
A4A4=$E$2&TEXT($E$3,"yyyy/mm/dd")&TEXT("A",)
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi there.

I am working on a bit of automation.
Lets start with the result that I want.
i need this bellow to auto generate when I drag a cell down.

DS2024/11/28A
DS2024/11/28B
DS2024/11/28C
DS2024/11/28D
DS2024/11/28E

how I do t now is I have the DS part and the Date auto filling from a fixed cell will put the formula bellow. " it is tailored to my sheet"
=$E$2&TEXT($E$3;"yyyy/mm/dd")&TEXT("A";)

E2 just has the letters "DS" in it.

what i am not able to figure out is to make the A at the end turn to a B if i drag the cell down.

i also need it to restart at A if the E3 cell changes to the next day. " E3 =today() "

i hope this is possible.


Book1.xlsx
ABCDE
1
2DS
32024-11-28
4DS2024/11/28A
5
6
Sheet1
Cell Formulas
RangeFormula
E3E3=TODAY()
A4A4=$E$2&TEXT($E$3,"yyyy/mm/dd")&TEXT("A",)

Hi & welcome to MrExcel.
If you never need to go beyond Z then how about
Cell Formulas
RangeFormula
E3E3=TODAY()
A4:A12A4=$E$2&TEXT($E$3,"yyyy/mm/dd")&CHAR(ROWS(A$4:A4)+64)
Okay, that could work but how do you get it to restart at A if it is a new day automatically?
 
Upvote 0
It will do that automatically, today the same sheet shows
Cell Formulas
RangeFormula
E3E3=TODAY()
A4:A12A4=$E$2&TEXT($E$3,"yyyy/mm/dd")&CHAR(ROWS(A$4:A4)+64)
There is a few problems with this.

the first problem is let's say today I created them to mark certain info.
the next day those dates of yesterday also changed.

so it can't build up a history because all the dates on the sheet will change even those I need to stay on the previous date.

The reason for this is that it is like an order number system.
I gave an order today and it needs to stay the same forever even if the formula is on the next day.
 
Upvote 0
You cannot do that if the formula is built looking at a date in E3. You would need VBA
 
Upvote 0
Hello,

You need to use VBA/macros to save the old dates. Otherwise the function TODAY() will recalculate on workbook open/calculation and update your yesterday's dates to today.

With a macro in VBA you can overpass this, for example by copying the cells with formulas and special pasting the values automatically.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,275
Members
452,902
Latest member
Knuddeluff

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