
August 12th, 2003, 12:44 AM
|
|
Junior Member
|
|
Join Date: Aug 2003
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
How to calculate the difference btwn a range in Excel
Hi All,
refer to attached.
how am i suppose to calculate the difference in the range that match to the date entered.
let me explain how it works.
Firstly you need to enter a date in "A22". Then key in the week at "A24" (eg.12).
The date is changed to a monday's at "A26". the data display at "G21:AF34" is refered to the monday's date that which you have entered a date and have changed it to the monday's date.
Then now is the problem that i encountered. i need to find and calculate the difference in a range.
i have to refer to the date at "A26"(take 11/08/03 as an example). the date have to find the match from "G22:G34" and "H21:AF21". when the match is found like "T34:Z34"(it sum up the 7 forward cells together) and subtract the above row. how the above row date is calculated, is take the before date of "11/08/03" such as "04/08/03" which is "S33:Y33" (sum up the 7 forward cells). place the difference at "D22".
so it means simply like this, SUM(T34:Z34)-SUM(S33:Y33). (i have highlight it in blue)
im not sure whether it can simply use a formula or need to use vbscript because it make use of a condition which is refer to the date at "A26".
Please help me with this problem.
Thanks,
Rachel
|