Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi! I'm using the lookup function to find a specific share price for a
certain date and that works great. However, I would now like to be able to calculate the average for a certain period, for example a quarter. This would be approx 65 observations starting at a defined date and ending at another defined date - everything in columns. My question is now wheter I can qombine the lookup and average function in order to achieve this? ..or any other way to do this? I have tried with =AVERAGE((LOOKUP(C4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007)),(LOOKUP(E4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007))) But that formula only returns the average of those two numbers found and I cant put a colon instead of a comma between the "cells looked up" in order to get the range of numbers - without an error message. Can anyone give me some help with this one? Regards, /Lars |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
=AVERAGE(IF(('share price'!$B$3:$B$1007=C4)*('share
price'!$B$3:$B$1007<=E4),'share price'!$C$3:$C$1007)) as an array formula, so commit with Ctrl-Shift-Enter -- HTH RP (remove nothere from the email address if mailing direct) "Lars F" wrote in message ... Hi! I'm using the lookup function to find a specific share price for a certain date and that works great. However, I would now like to be able to calculate the average for a certain period, for example a quarter. This would be approx 65 observations starting at a defined date and ending at another defined date - everything in columns. My question is now wheter I can qombine the lookup and average function in order to achieve this? ..or any other way to do this? I have tried with =AVERAGE((LOOKUP(C4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007)),(LOOKUP(E4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007))) But that formula only returns the average of those two numbers found and I cant put a colon instead of a comma between the "cells looked up" in order to get the range of numbers - without an error message. Can anyone give me some help with this one? Regards, /Lars |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Works great - thanks!!!
/Lars "Bob Phillips" wrote: =AVERAGE(IF(('share price'!$B$3:$B$1007=C4)*('share price'!$B$3:$B$1007<=E4),'share price'!$C$3:$C$1007)) as an array formula, so commit with Ctrl-Shift-Enter -- HTH RP (remove nothere from the email address if mailing direct) "Lars F" wrote in message ... Hi! I'm using the lookup function to find a specific share price for a certain date and that works great. However, I would now like to be able to calculate the average for a certain period, for example a quarter. This would be approx 65 observations starting at a defined date and ending at another defined date - everything in columns. My question is now wheter I can qombine the lookup and average function in order to achieve this? ..or any other way to do this? I have tried with =AVERAGE((LOOKUP(C4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007)),(LOOKUP(E4,'share price'!$B$3:$B$1007,'share price'!$C$3:$C$1007))) But that formula only returns the average of those two numbers found and I cant put a colon instead of a comma between the "cells looked up" in order to get the range of numbers - without an error message. Can anyone give me some help with this one? Regards, /Lars |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
The sum and average function view all numbers as zero?? | Excel Discussion (Misc queries) | |||
LOOKUP function | Excel Worksheet Functions | |||
Pivot table doing a lookup without using the lookup function? | Excel Discussion (Misc queries) | |||
Lookup function returning reference, not value | Excel Worksheet Functions | |||
average function in Excel 2002 | New Users to Excel |