#1   Report Post  
Posted to microsoft.public.excel.misc
Daniel9684
 
Posts: n/a
Default Averaging Cells

I have a simple spreadsheet, in columns A and B are months of the year (from
Jan 90 to present) and the Annual Inflation Rates for those years...

In cell E4, I enter Month X, and in F4 I enter Month Y

I need to work out the average of the corresponding inflation rates BETWEEN
those two months

e.g. if X is Jan 90 and Y is March 90, I need to find out the average of the
inflation rate for Jan Feb and Mar 90.

Anyone think they might be able to help me? I'm completely stumped!

Thanks
Daniel

  #2   Report Post  
Posted to microsoft.public.excel.misc
Fred Smith
 
Posts: n/a
Default Averaging Cells

You can define the range that you want to work with by using the Offset
function. Something like:

=average(offset(b1,e4,0,f4-e4+1,1))

This will give you the arithmetic average of the cell range. However, it will
*not* give you the actual inflation rate for that period, because inflation
rates compound just like interest rates.

If you want the actual inflation rate, you need to calculate the future value of
$1 from month e4 to f4. If the actual inflation rate is what you want, post back
if you need more help calculating it.

--
Regards,
Fred


"Daniel9684" wrote in message
...
I have a simple spreadsheet, in columns A and B are months of the year (from
Jan 90 to present) and the Annual Inflation Rates for those years...

In cell E4, I enter Month X, and in F4 I enter Month Y

I need to work out the average of the corresponding inflation rates BETWEEN
those two months

e.g. if X is Jan 90 and Y is March 90, I need to find out the average of the
inflation rate for Jan Feb and Mar 90.

Anyone think they might be able to help me? I'm completely stumped!

Thanks
Daniel



  #3   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default Averaging Cells

Try something like this array formula:

=AVERAGE(IF((MONTH(A1:A10)=MONTH(E4))*(YEAR(A1:A1 0)=YEAR(E4))*(MONTH(A1:A10)<=MONTH(F4))*(YEAR(A1: A10)<=YEAR(F4)),B1:B10))
enter using Ctrl+Shift+Enter

E4 and F4 must be formatted as dates

HTH
Jean-Guy

"Daniel9684" wrote:

I have a simple spreadsheet, in columns A and B are months of the year (from
Jan 90 to present) and the Annual Inflation Rates for those years...

In cell E4, I enter Month X, and in F4 I enter Month Y

I need to work out the average of the corresponding inflation rates BETWEEN
those two months

e.g. if X is Jan 90 and Y is March 90, I need to find out the average of the
inflation rate for Jan Feb and Mar 90.

Anyone think they might be able to help me? I'm completely stumped!

Thanks
Daniel

  #4   Report Post  
Posted to microsoft.public.excel.misc
pinmaster
 
Posts: n/a
Default Averaging Cells

The first formula I gave you doesn't seem to work across multiple years only
within a specific year, I don't know why so try this one instead:

=AVERAGE(IF((A1:A100=DATE(YEAR(E4),MONTH(E4),1))* (A1:A100<=DATE(YEAR(F4),MONTH(F4),1)),B1:B100))
or
=AVERAGE(IF((A1:A100=DATE(YEAR(E4),MONTH(E4),1))* (A1:A100<=DATE(YEAR(F4),MONTH(F4)+1,1)-1),B1:B100))
again enter using Ctrl+Shift+Enter

HTH
Jean-Guy

"Daniel9684" wrote:

I have a simple spreadsheet, in columns A and B are months of the year (from
Jan 90 to present) and the Annual Inflation Rates for those years...

In cell E4, I enter Month X, and in F4 I enter Month Y

I need to work out the average of the corresponding inflation rates BETWEEN
those two months

e.g. if X is Jan 90 and Y is March 90, I need to find out the average of the
inflation rate for Jan Feb and Mar 90.

Anyone think they might be able to help me? I'm completely stumped!

Thanks
Daniel

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
checking that cells have a value before the workbook will close kcdonaldson Excel Worksheet Functions 8 December 5th 05 04:57 PM
how do i protect cells in a shared worksheet Debi Excel Discussion (Misc queries) 3 September 30th 05 11:15 PM
Fill cells from non-adjacent cells Abes Excel Discussion (Misc queries) 2 March 25th 05 01:15 PM
Help adding text values Texas-DC_271 Excel Worksheet Functions 7 January 15th 05 11:14 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM


All times are GMT +1. The time now is 06:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"