For anyone who might have taken an interest in this discussion, I omitted a 
right parenthesis when I first posted this formula. It is now correct.

-- 
Jim

-----Original Message-----
From: James E Lang <jim+...@lang.hm>
To: users@global.libreoffice.org, pete nikolic <pg.nikol...@gmail.com>
Sent: Sat, 25 Apr 2015 11:47
Subject: Re: [libreoffice-users] selecting cells in calc sheet

The main thing I'm not understanding is whether the formula is to be one fixed 
place or if after 3 data points it is in cell X but after 4 data points it is 
in cell Y. The solution I gave you applies to the latter case.

For the former case I would use a more complex formula like this using your 
latest specification.

=IF(COUNT(A1:A50)>2,AVERAGE(OFFSET(A1,0,COUNT(A1:A50)-3,1,3))-30,"")

That says, if there are more than two values then define a horizontal range 
composed of the last three filled cells, average that range, and subtract 30. 
This works as long as they are no empty or text cells before the values of 
interest in A1:A50. This process gets a little bit (to say the least) more 
hairy if there are intervening cells.

-- 
Jim

-- 
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? http://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: http://wiki.documentfoundation.org/Netiquette
List archive: http://listarchives.libreoffice.org/global/users/
All messages sent to this list will be publicly archived and cannot be deleted

Reply via email to