View Single Post
  #1   Report Post  
cs.bonak cs.bonak is offline
Junior Member
 
Posts: 1
Default how to specify the first cell with data in it inside an if statement

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