LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Variable reference to noncontiguous cells...

Hi,

Am Thu, 30 Jan 2020 18:56:19 -0600 schrieb dpb:

="Average last 5 years
="&TEXT(AVERAGE(IF(MOD(COLUMN(OFFSET(AS7,0,-24):OFFSET(AS7,0,-8)),4)=1,OFFSET(AS7,0,-24):OFFSET(AS7,0,-8))),"
$#,##0. ") &"Range =
"&TEXT(MIN(IF(MOD(COLUMN(OFFSET(AS7,0,-24):OFFSET(AS7,0,-8)),4)=1,OFFSET(AS7,0,-24):OFFSET(AS7,0,-8))),"
$#,##0 ")&"-"
&TEXT(MAX(IF(MOD(COLUMN(OFFSET(AS7,0,-24):OFFSET(AS7,0,-8)),4)=1,OFFSET(AS7,0,-24):OFFSET(AS7,0,-8))),"
$#,##0. ")


OFFSET has two more arguments. You can use them to shorten the formula.
If all your cells are filled and you want average the range from column
U to the last column try:
=AVERAGE(IF(MOD(COLUMN(OFFSET(U7,,,,COUNTA(U7:ZZ7) )),4)=1,OFFSET(U7,,,,COUNTA(U7:ZZ7))))


Regards
Claus B.
--
Windows10
Office 2016
 
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
Variable reference to add cells Nick Savage Excel Discussion (Misc queries) 4 April 30th 10 07:08 PM
COUNTIF on NonContiguous Cells? RoadKill Excel Worksheet Functions 5 May 5th 09 09:34 PM
average of 12 noncontiguous cells goss[_2_] Excel Discussion (Misc queries) 6 November 12th 07 10:26 PM
Adding noncontiguous cells FJ Excel Discussion (Misc queries) 9 December 23rd 06 04:54 PM
noncontiguous cells Vivian Excel Discussion (Misc queries) 2 July 21st 06 01:00 AM


All times are GMT +1. The time now is 03:54 AM.

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"