Need formula

K

Karl Irvin

I have a worksheet like the following

Jan Feb Mar.. Dec
Rent 5 7 8

I need two more columns populated based on the month I'm working on.
If its month 2 in the year, I need to see the current month and year to data
amounts as follows

Jan Feb Mar.. Dec Cur Month YTD
Rent 5 7 8 7 12

In need a formula for the Cur Month and YTD columns that will populate them
based on month number (i.e 1 to 12)

Can this be done?
 
D

Domenic

Current month...

=INDEX(B2:M2,P2)

YTD...

=SUM(B2:INDEX(B2:M2,P2))

....where P2 contains the month number.

Hope this helps!
 

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