Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GMCN
 
Posts: n/a
Default OFFSET to include blank cells

Hi, help required please before this computer exits through the nearest
window!

I am using the formula

=AVERAGE(OFFSET(D6,COUNTIF(D7:D27,"=0%"),,-5,))

to give me a % average over the last 5 entries in my worksheet. After
much searching of various groups I managed to get it to average those
cells which are not blank. However I still cannot fathom how to get
OFFSET to accept the fact that there are blank cells. EG if D7 happens
to be blank then the last five entries start from the 2nd last entry.
Also if there happens to be a blank within the column then OFFSET
starts its count again from the next available cell containing data.

I need to have a formula which averages the last 5 entries which are =
0 no matter if there are empty cells in between. 1 cell in the column
will be filled from the results of another sheet's activity each
working day throughout the month so I do not want the formula to
activate until at least 5 entries have been made.

I seem to be asking for quite a lot here but I would be grateful if
anybody could help with any part of my request.

Thank you in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips
 
Posts: n/a
Default OFFSET to include blank cells

How about

=AVERAGE(INDEX(D7:D27,LARGE(IF(D7:D27<"",ROW(7:27 )-MIN(ROW(7:27))+1),5)):D2
7)

which is an array formula, it should be committed with Ctrl-Shift-Enter, not
just Enter.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"GMCN" wrote in message
oups.com...
Hi, help required please before this computer exits through the nearest
window!

I am using the formula

=AVERAGE(OFFSET(D6,COUNTIF(D7:D27,"=0%"),,-5,))

to give me a % average over the last 5 entries in my worksheet. After
much searching of various groups I managed to get it to average those
cells which are not blank. However I still cannot fathom how to get
OFFSET to accept the fact that there are blank cells. EG if D7 happens
to be blank then the last five entries start from the 2nd last entry.
Also if there happens to be a blank within the column then OFFSET
starts its count again from the next available cell containing data.

I need to have a formula which averages the last 5 entries which are =
0 no matter if there are empty cells in between. 1 cell in the column
will be filled from the results of another sheet's activity each
working day throughout the month so I do not want the formula to
activate until at least 5 entries have been made.

I seem to be asking for quite a lot here but I would be grateful if
anybody could help with any part of my request.

Thank you in advance.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
GMCN
 
Posts: n/a
Default OFFSET to include blank cells

Cheers Bob that worked a treat. I've given this post a top rating.

Glen

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
Counting blank cells until value is reached Dan Excel Worksheet Functions 9 March 1st 06 12:56 PM
Checking Blank Cells Karlos Excel Worksheet Functions 2 February 27th 06 12:34 PM
Excel inserted 0's in cells linked to blank cells lburg801 Excel Discussion (Misc queries) 5 October 28th 05 11:32 PM
CONCATENATE problem with blank cells roger_home Excel Discussion (Misc queries) 1 August 17th 05 09:18 PM
Copy down - special to fill only the blank cells Mike Excel Discussion (Misc queries) 3 April 18th 05 10:08 PM


All times are GMT +1. The time now is 12:51 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"