to maggie -

PAB

Member
Hi Again GillesD,

I probably did not explain properly what I would like to achieve. I ONLY want Combinations that appear in ANY Two Columns as Per the Grid ( the Grid Structure could possibly change ) below :-

Example Grid :-
01,02,03,04,05
06,07,08,09,10
11,12,13,14,15
16,17,18,19,20
21,22,23,24,25
26,27,28,29,30
31,32,33,34,35
36,37,38,39,40
41,42,43,44,45
46,47,48,49

So 01,02,03,04,05,06 & 01,02,06,07,11,13 & 21,24,25,26,27,31 would be EXCLUDED. I Re-Run my effort using If Not NotAllGridColumns12() for Combinations with the Six Numbers Appearing ONLY in Columns 1 & 2, and used ALL the Numbers NOT in the First Two Columns and it seemed to work O.K. Obviously if I was to Repeat this for the rest of the Columns ( Numbers ONLY in Columns 2&3, 3&4 and 3&5 etc ) I would end up with NO Combinations. I would also like to be able to, instead of having ALL Six Numbers in ONLY ANY Two columns, maybe have the Option to put the Scenario - 4 Numbers in One Column and the Other Two Numbers in ANY OTHER Two Columns for example.
Once again, A Very Big Thanks.

All the Best
PAB
:wavey:
 

PAB

Member
Hi GillesD,

Have you had a chance to look at the above regarding the Custom Grid Structure?. Is it easily achievable or too complicated to include in the Macro. Thanks again GillesD.

All the Best
PAB
:wavey:
 

PAB

Member
Hi GillesD,

Would setting up an Array Formula be the way to go perhaps, or would case Functions be the answer?.

All the Best
PAB
:wavey:
 

PAB

Member
Excel Formula for the Above

I know the following Excel Formula works for the above scenario :-

=IF(SUM(COUNTIF($A$1:$F$1,{1,6,11,16,21,26,31,36,41,46}))>4,"NOT OK",IF(SUM(COUNTIF($A$1:$F$1,{2,7,12,17,22,27,32,37,42,47}))>4,"NOT OK",IF(SUM(COUNTIF($A$1:$F$1,{3,8,13,18,23,28,33,38,43,48}))>4,"NOT OK",IF(SUM(COUNTIF($A$1:$F$1,{4,9,14,19,24,29,34,39,44,49}))>4,"NOT OK",IF(SUM(COUNTIF($A$1:$F$1,{5,10,15,20,25,30,35,40,45}))>4,"NOT OK","OK")))))

The thing is though, how can this be converted into VB Code in the above Macro?. As I mentioned before, it would be nice for it to be as flexible as possible, that way you could determine exactly how many Numbers you wanted in each column of the Custom Grid for example.

Thanks Very Much.
All the Best
PAB
:wavey:
 

PAB

Member
Hi GillesD,

I assume that this is not feasible using VB so is a Dead Duck.
Thank you very much for your time and effort.

All the Best
PAB
:wavey:
 

Sidebar

Top