Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need VBA help Please

Status
Not open for further replies.

PMasters28

Technical User
Oct 24, 2011
14
US
I don't know if I am going to explain this correctly but I am going to try. I am trying to help out my boyfriend by making it easier for him to complete his daily progress reports on the computer for his construction job. The VBA code that I need to create needs to control the date and the day of the week when you change the project day. For example when I type in 28 next to the blocks that ready Day:__ of 291 it needs to change the date and the day of the week. If anyone can help with this it would be very helpful. I have found a VBA to change the day of the week when you change the date so I know that I am halfway there I just need to be able to input the day of the project and it change it all. The reason for this is because it will make this portion of his paperwork quicker and allow him more time for paperwork that is more pressing. If anyone can help it would be very much appreciated. I included a link to the example of the excel workbook. If anyone could help that would be great just found out I originally posted this in the wrong spot.
 


Today's date is
[tt]
=today()
[/tt]
the other two are the day of week, which is just a FORMAT "ddd" of =Today()

and Day ___ which is the difference between start & today.

Am I missing somthing?

This is Excel 101, not that you might know that, but simply to point out that this is a REALLY SIMPLY 'problem'.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok, heres what Skip is saying

In his previous example cell A1 is the cell that holds the start date
A1: 9/26/2011


Cell A2 is the cell that holds the total number of days for the project
A2: 291

Cell A3 is adding the total number of days for the project to the start date. The total is the end date.
A3: =A1+A2


Cell A4 is the days lapsed since the project has started
A4: 28

Cell A5 is adding the days lapsed since the start of the project to get the current date. If the date isn’t right the lapsed days aren’t right.
A5: =A1+A4 which is 10/24/2011

Cell A6 is the result of cell A5 formated in the format cells area but going into custom and typing in “ddd”
A6: =A5 formatted as "ddd" in CUSTOM displays Mon

And as he just indicated =Today() is how to get todays date on the spreadhseet.
 



and furthermore, I am stating that
[tt]
Cell A4 is the days lapsed since the project has started
A4: 28
[/tt]
can and should ALSO be derived as
[tt]
A4: =today()-A1
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok I have the date and the week working together but them when I try to get the current day of the project and I type in =today()-C8 which is the cell that the project start date is in I get 1/29/1900 in the box where it should read 29
 
FYI - I got the same results when I put the start date in a different cell but when I did it as just indicated it worked.
 


assuming that C8 contains your START DATE.

Then right-click in the Cell with your formula and select FORMAT CELLS > Number Tab - GENERAL Category.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 


C8 must contain your START DATE for this formula to work as desired...
[tt]
=today()-C8
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
I had to go about it a different way but it worked. Thank you. I ended up having to say =G12-C8.
 


That will work if G12 has =Today() and C8 is your START DATE.

you might find it informative, since you are working with DATES, to read faq68-5827.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top