LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,045
Default how to specify the first cell with data in it inside an if statement

On Mon, 14 Jan 2013 02:17:43 +0000, cs.bonak wrote:


I keep a running avg of kids grades in Excel over a 2 week period. The
way i have the code now


AVERAGE(OFFSET('1'!E4,COUNTA('1'!D;D)-29,):OFFSET('1'!E4,COUNTA('1'!D;D),))


it returns an error if i don't have 2 weeks of data. I found a way
around this by doing this


=IFERROR(AVERAGE(OFFSET('1'!E4,COUNTA('1'!D;D)-29,):OFFSET('1'!E4,COUNTA('1'!D;D),)),IFERROR(...-28...-27...
Im Sure there is a better way to do this any help would be appreciated.

I know that its not supposed to be D;D But when i put the : this showed
up D:D so i changed it



I don't understand exactly what you are doing. I don't understand the relationship between your references, the two weeks of grades, and the -29 factor.

But one way is to make the size of reference in OFFSET the desired size, then compute the row offset.

=AVERAGE(OFFSET(E4:E18,COUNTA(D:D)-n,0))

where n might equal 29 would return a range that is 15 cells high, offset from the original E4:E18 range by a specified amount.

If this doesn't help, please provide more detailed information.
 
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
IF statement inside a SUMIF statement.... or alternative method Sungibungi Excel Worksheet Functions 3 December 4th 09 06:22 PM
array inside for statement Student Excel Programming 1 January 11th 08 04:56 PM
How to paste pictures as data inside cell? cna48 Excel Discussion (Misc queries) 1 November 5th 07 11:37 PM
vlookup inside an if statement? carlosgdlf Excel Discussion (Misc queries) 3 August 4th 05 02:36 AM
vlookup inside an if statement? carlosgdlf Excel Worksheet Functions 3 August 3rd 05 11:38 PM


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