Index function

E

et

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
 
T

T. Valko

For the current month:

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

For YTD:

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

Copy down as needed.

Biff
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top