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

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
So, for row 236 you would have 235 results of 1 or 0? Is that right?
 
Upvote 0
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!
 
Upvote 0
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).
 
Upvote 0
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
 
Upvote 0
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?
 
Upvote 0

Forum statistics

Threads
1,214,389
Messages
6,119,232
Members
448,879
Latest member
VanGirl

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