LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
RTB RTB is offline
external usenet poster
 
Posts: 1
Default VBA date in function

Hello,
I've been reading the posting and have found them to be very
informative in learning VBA. However, i have not been able to find
this:

i currently have a commission function that works great, but i can
only figure out how to get a quarterly number from it when i change
the date manually.

for example:
This is for Q3 '04
Function fee(Assets)
' schedule investment management fee
Const tier1 = 0.01 * (92 / 365)
Const tier2 = 0.01 * (92 / 365)
Const tier3 = 0.01 * (92 / 365)
Const tier4 = 0.01 * (92 / 365)
Const tier5 = 0.01 * (92 / 365)
' calculates annual management fee
Select Case Assets
Case 1 To 499999.99
fee = Assets * tier1
Case 500000 To 999999.99
fee = 500000 * tier1 + (Assets - 500000) * tier2
Case 1000000 To 1999999.99
fee = 500000 * tier1 + 500000 * tier2 + (Assets - 1000000)
* tier3
Case 2000000 To 5000000
fee = 500000 * tier1 + 500000 * tier2 + 1000000 * tier3 + _
(Assets - 2000000) * tier4
Case Is = 5000000
fee = 500000 * tier1 + 500000 * tier2 + 1000000 * tier3 + _
3000000 * tier4 + (Assets - 5000000) * tier5
End Select
End Function

how would i make the date 92 update to 91 in the next quarter Q1 '04
(90 days)(based on excels date format) and the future q1,q2,q3,q4?
But still have the history
Can this happen or is it a pipe dream?
thanks,
RTB
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Function to lookup date on tab in excel and populate date on calen MGC Excel Worksheet Functions 0 February 4th 10 04:48 AM
Difference betwen Excel Date () Function and System Date Khalil[_2_] Excel Worksheet Functions 2 June 16th 09 01:10 PM
Date Function formula that will return the date of a specific week Greg Excel Worksheet Functions 4 June 12th 06 05:07 PM
Calculating days between current date and a date in future NETWORKDAYS() function Faheem Khan Excel Worksheet Functions 2 February 10th 05 07:18 PM
A VBA function to give serial date for date and time? Android[_2_] Excel Programming 6 July 8th 04 03:55 PM


All times are GMT +1. The time now is 10:21 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"