# Calculate average until date = maturity

1. ## Calculate average until date = maturity

Here is what my excel table looks like
A B C D E F G K L M N
1 2012 2013 2014 2015 2016 2017 2018 Maturity 2016 Today's Year 2013
2 1% 3% 3.5% 2.1% 5.6% 4.3% 3.4%
3

I have about 15 series of rows with different numbers that go from 2012 to 2018. I would like to calculate the average for each row from today's year to maturity. In this case the average of numbers would go from B2 to E2. The maturity sometimes changes and well as today's year. I am new to VBA programming and I am trying to learn by doing. The books just do not help me.

Thank you,

Todd

2. ## Re: Calculate average until date = maturity

This is hard to understand

A B C D E F G K L M N
1 2012 2013 2014 2015 2016 2017 2018 Maturity 2016 Today's Year 2013
2 1% 3% 3.5% 2.1% 5.6% 4.3% 3.4%
3
Maybe this:
``Please Login or Register  to view this content.``

3. ## Re: Calculate average until date = maturity

Maybe the attached will help. I am trying to write a macro that will calculate all of the averages in Column J. I would like to be able to change the maturity year and update the average values.

Thanks for the above code but could not get it to work.

4. ## Re: Calculate average until date = maturity

I got to work. Thank you stnkynts

5. ## Re: Calculate average until date = maturity

Lol yeah, I would have never gotten that from your first post.

Try this:
``Please Login or Register  to view this content.``

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1