Copy date as 4 digit only

Goddess

Board Regular
Joined
Dec 3, 2015
Messages
114
Office Version
  1. 2021
Platform
  1. Windows
Hi,

I have a field with date, eg 12/4/2012. I have formatted it to yyyy so it becomes just 2012. The problem is, I need to copy this "2012" to another sheet. It should show just "2012" and the cell is formatted as "General" due to some formula referencing to it in other cells. I tried few ways to paste the number, but it came out different. Is there anyway to do this?

Thanks,
Irene
 

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
What about: =YEAR(Sheet1!A1)
Hi Stephen,

So sorry.. I wrongly phrase it as sheet.. I meant I need to copy to another file, so can't reference it to another file as it may cause some formula error if I don't email the source file.

Thanks for your reply!
 
Upvote 0
do you need text YYYY - or can you just format that cell the same

as date is a number and then the MASK , shows the different formats
 
Upvote 0
It's not clear what/how you're copying from one workbook to the other.

If you're happy for the date to be unchanged, but continuing showing as 2012, then just format the cell the same, as @etaf says.

That means, for example, that if you are using Copy/Paste Values you should also do a Copy/Paste Formatting.
 
Upvote 0

Forum statistics

Threads
1,225,738
Messages
6,186,734
Members
453,369
Latest member
juliewar

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