Julian Date

J

jer

Dear all
I hope I addressing the correct group. Is there a way to
program excel to fill an array with the julian date
example.

If activecell.value <> " " then ...
actuvecell = Julian Date (today = 216)
End if

thanks
jer
 
C

Chip Pearson

jer,

Try

ActiveCell = Int(Now) - DateSerial(Year(Now), 1, 0)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)
 
R

Ron Rosenfeld

Dear all
I hope I addressing the correct group. Is there a way to
program excel to fill an array with the julian date
example.

If activecell.value <> " " then ...
actuvecell = Julian Date (today = 216)
End if

thanks
jer

You seem to be using a definition of Julian Date as being the day number of the
current year.

If that is the case, then:

=TODAY()-DATE(YEAR(TODAY()),1,0)

will give the desired result.


--ron
 
R

Ron Rosenfeld

Dear all
I hope I addressing the correct group. Is there a way to
program excel to fill an array with the julian date
example.

If activecell.value <> " " then ...
actuvecell = Julian Date (today = 216)
End if

thanks
jer

Sorry, I forgot this was the programming group when I gave you a worksheet
formula. Chip's formula is the same as mine, but in VBA.


--ron
 
J

jer

Thanks Chip, the formula works just fine
jer
-----Original Message-----
jer,

Try

ActiveCell = Int(Now) - DateSerial(Year(Now), 1, 0)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)






.
 
J

jer

Thanks Chip, the formula works just fine
jer
-----Original Message-----
jer,

Try

ActiveCell = Int(Now) - DateSerial(Year(Now), 1, 0)


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com (e-mail address removed)






.
 

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