LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default calculate

Hi

I want to be able to calculate a figure based on the no. of weeks between a
range of dates.

eg.
Records:
Date From Date To Amount
3/11/03 17/11/03 120
18/11/03 7/12/03 130
8/12/03 - 150

If the date to field is blank then today's date is to be used

At the moment I have the following:

startdate = "24/11/2003"
Set fromsheet = ActiveSheet
Receipts = fromsheet.Cells(6, 3)
wks = DateDiff("ww", startdate, Now)
bal = Receipts - (wks * 120)

This works fine if the amount is always 120 and the start date is always
24/11/2003.
How can I change it so that
bal = the addition of No. of weeks between each date in the table * the
applicable amount?

The # of records will always be increasing - somehow I need to be able to
calculate each record separately

Thanks



 
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
Calculate age Chris waller Excel Discussion (Misc queries) 3 March 19th 10 10:30 PM
calculate time does not calculate Wanna Learn Excel Discussion (Misc queries) 4 August 19th 08 12:51 AM
How do I calculate? Tammy Excel Discussion (Misc queries) 5 December 18th 06 11:00 AM
Calculate Jeff Excel Discussion (Misc queries) 2 June 17th 06 10:56 PM
Macro that hide or unhide and not calculate or calculate Jonsson Excel Programming 1 August 19th 03 04:22 PM


All times are GMT +1. The time now is 06:59 AM.

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

About Us

"It's about Microsoft Excel"