Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

How can I

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bryan De-Lara - 17 Mar 2008 10:29 GMT
Could anyone please tell me how to delete values from a cell automatically
every time a work book is opened.
What I need to do is:-
On everyday from last year 2007 each cell could contain a value. In 2008
when we reach that same date, if 2007 has a value it has to be deleted, but
not before we reach that date.
i.e. 16 March 2007 would be deleted 16 March 2008. If a workbook hasn't been
opened for a week, then all the dates from the past week needs to be deleted
in one go.
I have a column with the days of the year (254), then columns with a value
in some cells going as far across as IL.
Can this be done?
As always, your help would be greatly appreciated.

Bryan.
Pete_UK - 17 Mar 2008 11:41 GMT
Bryan,

you would need a macro for this, but I'm not sure how it would
determine that the values you talk about referred to last year. From
an earlier post, you were talking about putting working dates in your
file for the whole year, so is this a different file? Do you have
working dates in this year up to the last time the file was opened,
and subsequent dates are for the previous year? If so, then you would
need the macro to change the dates for you - but how would it know
about Bank Holidays for the current year? Don't forget also that 17th
March 2007 (one year before today) was not a working day, so it would
not appear in your file when it is opened today.

Pete

On Mar 17, 9:29 am, "Bryan De-Lara" <bryan.delara...@btinternet.com>
wrote:
> Could anyone please tell me how to delete values from a cell automatically
> every time a work book is opened.
[quoted text clipped - 11 lines]
>
> Bryan.
Bryan De-Lara - 18 Mar 2008 09:13 GMT
A macro is what I thought would be suggested. Yes Pete you are right when
you mention 17th March 2007 was a working day but not 2008.
What I have is two years, every working day going down. Both years start on
Jan 2nd. To get the count done in blocks because they are rolling years, it
had to be done this way. If I had like I did at first, had each year on a
separate sheet then it would sometimes give a false reading if someone was
sick the last day in 2007 and the first day in 2008, when in fact it was
part of a block.
A marcro for what I am trying to accomplish sounds very complex. I can just
about record a macro on a button to take me to a predefined place in a
workbook. I've had no training in any application so I think writing a
macro, and I have looked at a few, will be beyond me. I'm pleased with what
I have now, it just means deleting has to be done manually. Where I am now
is down to people like yourself, who give their time and expertise freely
and you all need congratulating on your generosity.
Thanks also to Dude Ranch for your input also.

Bryan.

Bryan,

you would need a macro for this, but I'm not sure how it would
determine that the values you talk about referred to last year. From
an earlier post, you were talking about putting working dates in your
file for the whole year, so is this a different file? Do you have
working dates in this year up to the last time the file was opened,
and subsequent dates are for the previous year? If so, then you would
need the macro to change the dates for you - but how would it know
about Bank Holidays for the current year? Don't forget also that 17th
March 2007 (one year before today) was not a working day, so it would
not appear in your file when it is opened today.

Pete

On Mar 17, 9:29 am, "Bryan De-Lara" <bryan.delara...@btinternet.com>
wrote:
> Could anyone please tell me how to delete values from a cell automatically
> every time a work book is opened.
[quoted text clipped - 14 lines]
>
> Bryan.
Dude Ranch - 17 Mar 2008 12:45 GMT
Bryan,
I will start your answer to "Can this be done?" with - this is Excel - relax
there is almost ALWAYS a way.

With respect to your answer - I will assume you can do some macro (VBA)
work, so I will point you to the simple guidance (hopefully) you need.

Goto your sheet 1 tab and right mouse click select view code, in VB view
select "This Workbook"
This should automatically select "WorkBook Open()" place yur code in here to
accomplish below and it will execute everytime you open the workbook.

Enjoy

> Could anyone please tell me how to delete values from a cell automatically
> every time a work book is opened.
[quoted text clipped - 11 lines]
>
> Bryan.

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.