Array formula question

nisaf

New Member
Joined
Sep 29, 2006
Messages
2
Have a question ---

I have a database 9 columns 236 rows.
------ would like to do an iterative data comparison
i.e. compare all 9 cells in row 1 and if they are <= cells in row 2, then return a 1 (true) or 0 (false), then compare row1 to row3, row1 to row4 etc until we have done comparison of row1 to row236.
Then do the same thing for row2 --- cf. row2 to row3, row2 to row 4 ....
Row2 to row236. etc etc.

Any ideas on how to do this efficiently.
Thanks in advance
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,547
So, for row 236 you would have 235 results of 1 or 0? Is that right?
 

sbendbuckeye

Active Member
Joined
Nov 26, 2003
Messages
440
Do you only want a global True and False, in other words as soon as one is different stop processing or do you literally want to check each one? Good Luck!
 

nisaf

New Member
Joined
Sep 29, 2006
Messages
2
Hi GlennUK
-- the way I figure it, overall there will be 27,730 comparisons
i.e. for row1 there will be 235 comparisons(r1 to r2, r1 to r3, ... r1 to r236); for row2 there are 234 comparisons (r2 to r3, r2 to r4.. r2 to r236) etc until row235 where there is 1 comparison(r235 to r236).
 

pgc01

MrExcel MVP
Joined
Apr 25, 2006
Messages
19,884
Hi nisaf

You are right. There are COMBIN(236,2)=27730 comparisons.

One suggestion. Write the row combinations and use them with INDEX to locate the cells to compare.

Hope this helps
PGC
 

GlennUK

Well-known Member
Joined
Jul 8, 2002
Messages
11,547
I would write a macro to generate the combinations in 27730 pairs of cells, and write a formula to do the comparison that could be copied down the list. Is that the kind of solution that would suit?
 

Forum statistics

Threads
1,137,329
Messages
5,680,853
Members
419,935
Latest member
analyst0503

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
Top