View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Formula for calculating YTD values

Assume the table you posted is in A1:G3
Assume the "month" will be input in A5, eg: Mar
You could place this in A6:
=SUMPRODUCT(--(OFFSET(B2,,,,MATCH($A$5,$B$1:$IV$1,0))))
to derive the salaries summation from Jan to Mar.
Copy A6 down to A7 to derive the similar summation for "Annual leave"
Reconfigure the above to suit your desired layout
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---


"Suan" wrote:

Hi
I am trying to set up a table that, when you change the date every month for
a range of values by month it sums up the YTD value.
eg

Jan Feb Mar April May
June
Salaries 10000 12000 18000 18000 20000 20000
Annual Leave 6000 5000 5000 4500 5500 6000

for example , If we are in the month of April, if I enter the date April the
formula should calculate Jan - April Salaries and annual leave?
And if I change the date to June the formula should calculate value from Jan
to June.

Hope it makes sense

Thanks
--
SC