Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Need help with this reference problem

For this array formula,

=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:10"))))

I'd like to modify it such that it will look up another cell (e.g. C5) for
the number of cells I want to average instead of a constant of 10.

I tried to change it to
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:N")))) and name the C5 cell "N" and
apparently it didn't work.

How should I fix it? Thx in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Need help with this reference problem

Hi
try:
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:" & C5))))

or as alternative:
=AVERAGE(IF(A1:A60<=SMALL(A1:A60,C5)))

--
Regards
Frank Kabel
Frankfurt, Germany

"<<<Golf4U" schrieb im Newsbeitrag
news:Pb7Uc.33543$fz2.3543@edtnps89...
For this array formula,

=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:10"))))

I'd like to modify it such that it will look up another cell (e.g.

C5) for
the number of cells I want to average instead of a constant of 10.

I tried to change it to
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:N")))) and name the C5 cell "N"

and
apparently it didn't work.

How should I fix it? Thx in advance.




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Need help with this reference problem

Hi Don
I think you left a &" :-).

probably should read:
ROW(INDIRECT("1:"&c5))))

--
Regards
Frank Kabel
Frankfurt, Germany

"Don Guillett" schrieb im Newsbeitrag
...
without testing, try
ROW(INDIRECT("1:"&c5&"))))

--
Don Guillett
SalesAid Software

"<<<Golf4U" wrote in message
news:Pb7Uc.33543$fz2.3543@edtnps89...
For this array formula,

=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:10"))))

I'd like to modify it such that it will look up another cell (e.g.

C5) for
the number of cells I want to average instead of a constant of 10.

I tried to change it to
=AVERAGE(SMALL(A1:A60,ROW(INDIRECT("1:N")))) and name the C5 cell

"N" and
apparently it didn't work.

How should I fix it? Thx in advance.






  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Need help with this reference problem

Thanks a lot ! Tried your first suggestion and it works, but the
alternative doesn't though.


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
A reference problem - I THINK? Los Excel Discussion (Misc queries) 2 May 13th 08 07:20 PM
Problem w/ cell reference WLMPilot Excel Discussion (Misc queries) 2 March 30th 08 03:54 PM
Reference problem jesmin Excel Discussion (Misc queries) 4 February 6th 06 02:08 PM
Problem with =sum(offset(cell reference,w,x,y,z). I want cell reference to be variable [email protected] Excel Worksheet Functions 2 December 11th 04 12:00 AM
Another Reference Problem bob Excel Programming 0 August 16th 04 03:47 PM


All times are GMT +1. The time now is 02:10 PM.

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

About Us

"It's about Microsoft Excel"