Formula for Non-contiguous ranges

LearnMeExcel

Well-known Member
Joined
Aug 11, 2009
Messages
746
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
HI all
i have this data
Excel Workbook
ABCDE
1Area 115
2Area 2#DIV/0!
3Area 36
4Area 46
5Area 510#N/A
6Area 65
7
8
9Excel 201042
10CSE#VALUE!
11Sumproduct#VALUE!
Sheet2
Excel 2010
Cell Formulas
RangeFormula
B9=AGGREGATE(9,6,B1,C2,E3,C4,B5,D5,E6)
B11=SUMPRODUCT(--ISNUMBER((B1,C2,E3,C4,B5,D5,E6)),(B1,C2,E3,C4,B5,D5,E6))
#VALUE!
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.

in CSE and sumproduct it gives error
how i can solve it
 

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
Try this in B10:

=IF(ISERROR(OR(B1,C2,E3,C4,B5,D5,E6)),"",SUM(B1,C2,E3,C4,B5,D5,E6))

Try this in B11:

=SUMPRODUCT(--ISNUMBER(OR(B1,C2,E3,C4,B5,D5,E6)),(B1,C2,E3,C4,B5,D5,E6))

Im unsure if these will help but worth a try :S

Jesse
 
Upvote 0
SUMPRODUCT not really worth pursuing IMO.

Arrays - to work pre XL2007 etc:

Code:
=SUM(IF(ISNUMBER(CHOOSE({1,2,3,4,5,6,7},B1,C2,E3,C4,B5,D5,E6)),CHOOSE({1,2,3,4,5,6,7},B1,C2,E3,C4,B5,D5,E6)))
confirmed with CTRL + SHIFT + ENTER

or:

Code:
=SUM(IF(ISNUMBER(N(INDIRECT({"B1","C2","E3","C4","B5","D5","E6"}))),N(INDIRECT({"B1","C2","E3","C4","B5","D5","E6"}))))
confirmed with CTRL + SHIFT + ENTER
 
Upvote 0
thanx Lucke
it is great formula
but i think it is not easy to write it
special if i have more 20 cells Non-contiguous
i should write every cell alone :(
another point please
when i evaluate the second formula
=SUM(IF(ISNUMBER(N(INDIRECT({"B1","C2","E3","C4","B5","D5","E6"}))),N(INDIRECT({"B1","C2","E3","C4","B5","D5","E6"}))))
at the first step of evaluate this part
INDIRECT({"B1","C2","E3","C4","B5","D5","E6"})
apears as error
N({#VALUE,#VALUE,#VALUE,#VALUE,#VALUE,#VALUE,#VALUE})
then after evaluate n the correct result apear
why ??
 
Upvote 0
A formula of this nature isn't going to be straightforward I'm afraid...

There are some functions that work happily with non-contiguous ranges (SUM, LARGE etc...) but not so well with underlying errors.

Other functions work happily with underlying errors but not so well with non-contiguous ranges (SUMIF for ex.)

Regards your query concerning use of Evaluate Formula, #VALUE! and N... I'm afraid I don't have an answer for you there - all I know is that you need to use N to get the number (T for text equivalent).
 
Upvote 0

Forum statistics

Threads
1,224,583
Messages
6,179,678
Members
452,937
Latest member
Bhg1984

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top