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 / Setup / December 2007

Tip: Looking for answers? Try searching our database.

How can I enter monthly fee in one cell in excel?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
deacon - 14 Dec 2007 23:03 GMT
I am setting up a financial statement and need to have a fee of a set amount
added on the seventh of each month. I want the date of the seventh to add 3
to the value already present in one cell.
Bob Phillips - 15 Dec 2007 09:52 GMT
Private Sub Workbook_Open()
Dim myId As Date

   myId = Date - 1 ' in case it doesn't already exist
   On Error Resume Next
   myId = Evaluate(ThisWorkbook.Names("_Updated").RefersTo)
   On Error GoTo 0
   If myId < Date And Day(Date) = 15 Then
       With Worksheets("Sheet1").Range("A1")   '<=== change to suit
           .Value = .Value + 3
       End With
   End If
   ThisWorkbook.Names.Add Name:="_Updated", RefersTo:=Date
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

Signature

HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

>I am setting up a financial statement and need to have a fee of a set
>amount
> added on the seventh of each month. I want the date of the seventh to add
> 3
> to the value already present in one cell.
deacon - 15 Dec 2007 16:17 GMT
> Private Sub Workbook_Open()
> Dim myId As Date
[quoted text clipped - 21 lines]
> > 3
> > to the value already present in one cell.

Thanks Bob, but I have the 2007 Office programs and didn't see the excel
icon. the formula is a little over my head, but I get the idea, just not sure
how to appropriate it. I'll play with it!

Mike
Bob Phillips - 17 Dec 2007 08:52 GMT
How about minimizing the worksheet and following the alternative
instructions?

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

>> Private Sub Workbook_Open()
>> Dim myId As Date
[quoted text clipped - 29 lines]
>
> Mike
deacon - 17 Dec 2007 12:41 GMT
Thanks Bob, actually, I "played around" by clicking the Office button in the
upper left, then "Excel options," then "customize." There's a check box in
there which let's you put a short cut in the upper left (the little box where
"save" and "undo" and "redo" appear by default. So, I did that, pasted in
your formula with the appropriated day of the month. Then, I saved a copy of
the worksheet, changed the date on the toolbar and tried it; it seems to be
working, but we'll see what happens on January 7th! Thanks again.

Mike Myers

> How about minimizing the worksheet and following the alternative
> instructions?
[quoted text clipped - 32 lines]
> >
> > Mike
Bob Phillips - 17 Dec 2007 13:30 GMT
You mean that you have added it to the QAT.

What is that item called in the Customize list?

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Thanks Bob, actually, I "played around" by clicking the Office button in
> the
[quoted text clipped - 49 lines]
>> >
>> > Mike
deacon - 17 Dec 2007 14:30 GMT
"view code" that's where I pasted the formula in.

> You mean that you have added it to the QAT.
>
[quoted text clipped - 53 lines]
> >> >
> >> > Mike
Bob Phillips - 17 Dec 2007 18:03 GMT
But that takes you to the current worksheet code, not the Thisworkbook code.

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> "view code" that's where I pasted the formula in.
>
[quoted text clipped - 63 lines]
>> >> >
>> >> > Mike
deacon - 17 Dec 2007 22:05 GMT
Actually, it gives you the option to go to any sheet, or to Thisworkbook in
the Excel 2007 I'm using.

> But that takes you to the current worksheet code, not the Thisworkbook code.
>
[quoted text clipped - 65 lines]
> >> >> >
> >> >> > Mike
Bob Phillips - 18 Dec 2007 09:34 GMT
Once you are in the VBIDE yes, but in starts by taking you to the worksheet
code module.

In 2003, the instructions that I give take you directly to ThisWorkbook. It
would be nice to be able to do the same in 2007 wouldn't it? They seem to
have removed so many nice little things in 2007. Shame.

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Actually, it gives you the option to go to any sheet, or to Thisworkbook
> in
[quoted text clipped - 79 lines]
>> >> >> >
>> >> >> > Mike
deacon - 18 Dec 2007 12:38 GMT
Yes, I first pasted into the "worksheet code" and then had to back out of
that, re-read your instructions two or three times, and then I found
Thisworkbook and did it all over again.  My skill in Excel is a lot more
primitive than yours, but, yeah, some of the changes they made in 07 seem to
be a little counterintuitive.

Thanks for your help on this.

> Once you are in the VBIDE yes, but in starts by taking you to the worksheet
> code module.
[quoted text clipped - 86 lines]
> >> >> >> >
> >> >> >> > Mike

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.