Format date

FrankE67

New Member
Joined
Dec 9, 2024
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi all. It's me again. I can't seem to find the thread i got the answer from, i have done it before but can't remember how now. I want to insert date in the format yyyymmdd (input as 2020220) in c3. in c4 i want to put , let's say a 6, in c5 i want to add the two together and get a yyyymmdd result. i can't find a way to do it without inputing 2020/02/20 in c3. am i just getting old? how can i format it so it takes the 20200220 as date?
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Odd request but try:
Book1
CD
1
2
320200220<-General
46<-General
520200226<-Formatted as yyyymmdd
Sheet1
Cell Formulas
RangeFormula
C5C5=C3-20156339+C4
 
Upvote 0
I've discovered that the above won't work for all cases. This is more robust.
Book1
CD
1
2
320200101<-General
46<-General
520200107<-Formatted as yyyymmdd
Sheet1
Cell Formulas
RangeFormula
C5C5=--(MID(C3,5,2)&"/"&RIGHT(C3,2) &"/"&LEFT(C3,4))+C4
 
Upvote 0

Forum statistics

Threads
1,224,700
Messages
6,180,439
Members
452,982
Latest member
mark73

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