View Single Post
  #8   Report Post  
Domenic
 
Posts: n/a
Default

Okay, I think I understand. Let's see if I have this right... :)

1) Select B2

2) Define the following references...

Insert Name Define

Name: MMULT1

Refers to:

=MMULT(--(Results=Sheet1!$A2),TRANSPOSE(COLUMN(Results)^0))

Click Add

Name: MMULT2

Refers to:

=MMULT(--(Results=Sheet1!$B$1),TRANSPOSE(COLUMN(Results)^0) )

Click Ok

3) Enter the following formula in B2, copy across and down:

=IF($A2<$B$1,LARGE(IF((MMULT1)*(MMULT2),ROW(Resul ts)-MIN(ROW(Results))+1
),COLUMNS($B2:B2))-LARGE(IF((MMULT1)*(MMULT2),ROW(Results)-MIN(ROW(Result
s))+1),COLUMNS($B2:B2)+1)-1,"")

....confirmed with CONTROL+SHIFT+ENTER.

4) Use conditional formatting to hide #NUM! error values that will
result when no other intervals exist. If you need help with this, post
back.

Note: In the interest of making the formula for B2 shorter and somewhat
more efficient, I tried to define references for both LARGE functions.
I was hoping to be able to do something like this...

=IF($A2<$B$1,<FirstLargeReference-<SecondLargeReference-1,"")

But for some reason I get error messages for the second interval and
onwards. You may want to try this yourself, just in case it has
something to do with my version of Excel. If you need help with this,
post back.

Hope this helps!

In article ,
"Sam via OfficeKB.com" wrote:

Hi Domenic,

Thank you very much for sample file - I must have made an error when
transferring the Formulas. The #N/A errors are no mo I know get calculated
Intervals.

Unfortunately, I did not explain that I was looking for the calculated
Intervals of the two criterion to be displayed across their own individual
Row where they intersect - Interval calculated per your Formula but for each
occurrence of the paired criteria eg: 82 and 80 - Intervals displayed across
the entire Row where they intersect. I would have numerous criterion
vertically but only one horizontally. In the example below, your Formula
would correctly return blank for Intervals relating to criteria 80 80.
Criteria 81 80 should return various Intervals across that Row and the same
for the others such as 82 80 and 83 80.

Example Chart / Matrix Layout:
Cell Ref. A2 and B1 criterion 80 and 80
Cell Ref. A3 and B1 criterion 81 and 80
Cell Ref. A4 and B1 criterion 82 and 80

Criteria B1 houses 80
A2 houses 80
A3 houses 81
A4 houses 82 16 8 2 12 20 30 3 5 10 11 14
A5 houses 83

Cheers
Sam