Auto populate date

Jayzon

New Member
Joined
Feb 17, 2013
Messages
34
Office Version
  1. 365
Platform
  1. Windows
Hi
Is there a way to auto populate cells with a date based on the year entered in another.
In the frotpage sheet i enter 2021 in B6 and then i would like B6 in the January-2021 sheet to auto populate with the date 01-01-2021.
And based on B6 in the January-2021 sheet i would like B6 in February-2021 to auto populate with the date 01-02-2021.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Just use

=DATE(Frontpage!B6,2,1)

If you use a date as the year you'll need

=DATE(YEAR(January-2021!B6),2,1)

Also, be careful, you need commas. Not semicolon or full stops in functions.
I am on a danish version of excel the first formula worked when i changed the commas with semicolons, i am not having the same luck with this. =DATE(YEAR(January-2021!B6),2,1) i get the same error.

No matter what i try it adds the ' ' to 2021 and ,2,1 is marked up in gray.
 
Upvote 0
Try it like
Excel Formula:
=DATE(YEAR('January-2021'!B6),2,1)
or in Danish
Excel Formula:
=DATO(ÅR('January-2021'!B6);2;1)
 
Upvote 0
That depends on the local settings & language version. A lot of countries use semi-colons as separators in formulae
No matter what i try with =DATE(YEAR(January-2021!B6),2,1) i get the #NAME? error, it adds ' ' to 2021 and marks ,2,1 in a gray box.

The danish equivalent of this should be =DATO(ÅR(January-2021!B6);1;2) based on the previous syntax
 
Upvote 0
Try it like
Excel Formula:
=DATE(YEAR('January-2021'!B6),2,1)
or in Danish
Excel Formula:
=DATO(ÅR('January-2021'!B6);2;1)
That did the trick.

Thanks all for the help.
 
Upvote 0

Forum statistics

Threads
1,215,003
Messages
6,122,655
Members
449,091
Latest member
peppernaut

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