1
   

Excel Question

 
 
Reply Sat 28 Aug, 2004 05:56 pm
This one has really been bugging me. At work I use a printed excel document as a worksheet and I have to hand write dates on it every day. I want to be able to print the excel documents on a daily basis and have the dates automatically filled in for me. But it's not just the date that I'm printing it. Here's an example of what I have to hand write and what I'd like filled in automatically:

If the document was printed today, Saturday 08/28/04 the dates would be filled in as follows:

Tomorrow: 082904

Today: 082804

Yesterday: 082704

Last Sunday: 082204 (Always printed on a Saturday so it would be the date from 6 days before.

Period: 0804 (The month and the year, but always ending on a Saturday. For example, the days of 08/01/04 to 09/04/04 would still be period 0804 and it would change to period 0904 on 09/05/04, because that is the first Sunday of the month.)

Week: 34 (The number of weeks that have passed for the current calendar year)

If anybody could tell me how to do this I would be grateful.
  • Topic Stats
  • Top Replies
  • Link to this Topic
Type: Discussion • Score: 1 • Views: 937 • Replies: 7
No top replies

 
roger
 
  1  
Reply Sat 28 Aug, 2004 06:16 pm
A starting point would be on the overhead menu. Pick:

File
Page setup
Header/footer
Custom Header
With cursor in the section you want the date, select the calender icon.

This will print the current date - also time, if that's what you want. Whether you can tease it into producing prior and future dates, or not, I don't know. Also, any time you reprint the document, it is going to cough up the current date, not the date you created the thing.

Don't know if this is going to help or not.
0 Replies
 
roverroad
 
  1  
Reply Sun 29 Aug, 2004 12:29 am
Thanks Roger, that helps a little bit. Hopefully someone still knows if there's a way to do the rest of the dates.
0 Replies
 
Craven de Kere
 
  1  
Reply Sun 29 Aug, 2004 03:46 am
Re: Excel Question
roverroad wrote:

Tomorrow: 082904


Code:=TODAY()+1


Quote:
Today: 082804


Code:=TODAY()


Quote:
Yesterday: 082704


Code:=TODAY()-1


Quote:
Last Sunday: 082204 (Always printed on a Saturday so it would be the date from 6 days before.


Code:=TODAY()-6


Grrr, I got as far as "last sunday" and started hacking out a formula, till I noticed you said it would always be -6. Embarrassed

Quote:
Period: 0804 (The month and the year, but always ending on a Saturday. For example, the days of 08/01/04 to 09/04/04 would still be period 0804 and it would change to period 0904 on 09/05/04, because that is the first Sunday of the month.)


This one was difficult.

Code: =IF(IF(WEEKDAY(MONTH(TODAY())&"/01/"&YEAR(TODAY()),3)>5,12-WEEKDAY(MONTH(TODAY())&"/01/"&YEAR(TODAY()),3),0)+(MONTH(TODAY())&"/1/"&YEAR(TODAY()))=TODAY(),MONTH(TODAY())-1&(YEAR(TODAY())),MONTH(TODAY())&(YEAR(TODAY())))


It basically, it finds out what the first day of the current month is, then it finds out what the first saturday of the month is, then it checks to see if today is the first saturday of the month.

If so, it prints "month-1" and the year.

If not, it prints month and year.

I did not get it to do years like "04" because excel uses years like "2004". So it would make periods like "82004".

If you really need it to be formatted like "0804" then use this formula (only works for post 2000 years).

Code:=IF(IF(WEEKDAY(MONTH(TODAY())&"/01/"&YEAR(TODAY()),3)>5,12-WEEKDAY(MONTH(TODAY())&"/01/"&YEAR(TODAY()),3),0)+(MONTH(TODAY())&"/1/"&YEAR(TODAY()))=TODAY(),"0"&MONTH(TODAY())-1&"0"&(YEAR(TODAY())-2000),"0"&MONTH(TODAY())&"0"&(YEAR(TODAY())-2000))


Quote:
Week: 34 (The number of weeks that have passed for the current calendar year)


Code:=DAYS360("1/01/"&YEAR(TODAY()),TODAY())/7


Regards

PS. thanks for asking this question, it made me learn as much as you did.

PPS. if your boss ever gets on you for surfin' a2k, show them this thread. When my ole boss saw how many work answers I got through a2k he told everyone in the company to use it as their homepage.
0 Replies
 
roverroad
 
  1  
Reply Thu 2 Sep, 2004 08:41 pm
Re: Excel Question
Cool, thanks Craven de Kere. That helps a lot!
0 Replies
 
roverroad
 
  1  
Reply Thu 2 Sep, 2004 08:50 pm
Re: Excel Question
Quote:
PPS. if your boss ever gets on you for surfin' a2k, show them this thread. When my ole boss saw how many work answers I got through a2k he told everyone in the company to use it as their homepage.


Right:) This site does have some work related value. We're allowed to use the internet for this kind of stuff. It's when I talk politics or play around that they don't care for so much.

Thanks a lot for the help. I've asked this before on other sites but never got an answer before.
0 Replies
 
Craven de Kere
 
  1  
Reply Fri 3 Sep, 2004 12:23 am
My pleasure. It was fun figuring out the tough one.
0 Replies
 
rochelle
 
  1  
Reply Sun 5 Sep, 2004 05:43 pm
Excel Timesaver
I'm not sure if you've already done this, but you could save a whole lot of time by creating a template and just using it everyday. You didn't say if you have to save these everyday or just print them and delete them, but either way it would probably be a lot more efficient. It seems like it would be especially useful because you'd only have to input the formulas that Craven de Kere gave you one time and if you have to make any formmatting changes to the data you add daily you can just format the empty cells where your info will go before you save it.
0 Replies
 
 

Related Topics

Clone of Micosoft Office - Question by Advocate
Do You Turn Off Your Computer at Night? - Discussion by Phoenix32890
The "Death" of the Computer Mouse - Discussion by Phoenix32890
Windows 10... - Discussion by Region Philbis
Surface Pro 3: What do you think? - Question by neologist
Windows 8 tips thread - Discussion by Wilso
GOOGLE CHROME - Question by Setanta
.Net and Firefox... - Discussion by gungasnake
Hacking a computer and remote access - Discussion by trying2learn
 
  1. Forums
  2. » Excel Question
Copyright © 2024 MadLab, LLC :: Terms of Service :: Privacy Policy :: Page generated in 0.03 seconds on 05/03/2024 at 01:24:28