Creating a date from multiple cells

  • Thread starter Thread starter pendrgn
  • Start date Start date
P

pendrgn

Hello,
I am working on a workbook that will have a calendar in it. I hav
it setup for 2004, but I want to be able to run a mcaro that wil
change it every year. I want to create a cell that will be formated t
show what the first day of the month will be. I though if I used
formula to add a cell containing something like Jan 01+sheet1!A
(sheet1 A1 being where the current year is displayed) that would giv
me a cell that equals Jan 01 2004, but this doesn't seem to work. If
could get that to work, then I could format the date to only show th
day, and then I can use the macro I'm working on in VB to update th
calendar. If anyone can help me with this, please let me know.

Thanks,
Mik
 
Hi Mike,
to get the 1st January of each year you can use:
=DATE('sheet1'!A1,1,1)
where A1 stores your year

Frank
 
Hi Frank,
Thanks for the reply. I tried putting in the funtion you gave me
and I keep getting a #NUM! error. Any suggestions on what would b
causing this?

Mik
 
Frank,
Thanks for the reply earlier. I figured out what was causing th
error. I am using the today() function and formatting the cell to onl
show the year. When I referenced to this it was giving me a reall
large number that represented today's date. I found that if I used th
year() function with in the date function it works.

Mik
 
Hi Mike
what is your value in cell A1 on your referenced sheet. If this is a
text you would get the #VALUE error. Otherwise this should work

Frank
 
Back
Top