Thread: Index function
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Index function

For the current month:

=INDEX(B6:F6,MONTH(TODAY()))

For YTD:

=SUM(B6:INDEX(B6:F6,MONTH(TODAY())))

Copy down as needed.

Biff

"et" wrote in message
...
Dear all,

Could anybody help to advise me the appropriate formula to draw a
year-to-date figure from a table. I have a worksheet storing expenses, I
am using INDEX function to draw the current month expense, but I don't
know how to set a formula to draw the accumulated figure of that month.
For example, if I choose feb (2) as current month, I would like to YTD
column show the sum of Jan & Feb.

Thanks in advance for your help.
et


Current Mth : 2
Exp Jan Feb Mar Apr May Cur Mth YTD
Tel 100 101 110 98 102 =INDEX(B6:F6,2)
Rent 1000 1000 1000 1000 1000 1000
Entertainment 200 500 300 58 117 500