Creating a date from multiple cells

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
 
F

Frank Kabel

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

Frank
 
P

pendrgn

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
 
P

pendrgn

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
 
F

Frank Kabel

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top