In Worksheet1 I have a small table (AK28:AZ28) of numbers which have been established via a calculated event (example: the formula in AK28 is =IF(OR(AK25="X",AK24=""),99,AK24)).
AK24 would either equal a number (1-20 or 99) or an X. The "X" represents the number has already been use, the 99 represents that the number is not available. The end results would place either a valid number 1-20 or a 99 in each cell.
AK28:AZ28 is then copied and pasted (transposed) to BE35:BE50.
BE35:BE50 is then sorted low to high and examined to remove all 99's to leave me with just valid player numbers all at the top.
BE35:BE46 is then copied to Worksheet2(A8:A19). I only go to BE46 instead of BE50 because I know 4 players have already been selected. NOTE: It is very possible that several players may not have been available which resulted in 99's or what is now intended to be cleared or emptied cells being copied and brought forward.
The problem I am having is that the Worksheet2 formula {=combinations(A8:A19,4)} used to create all 495 potential combinations using the values in A8:A19 is seeing some kind of value in those cells which appear to be blank. The combination formula is putting a ZERO in where there should be nothing or a blank. And this is not only messing everything up... but it has really stumped me.
I've created a work around that occurs subsequent to this by looping thru and clearing the ZERO's but that adds a minimum of 5 seconds to the process.
Any thoughts on how to resolve this problem would be appreciated.
Thanks,
Don
AK24 would either equal a number (1-20 or 99) or an X. The "X" represents the number has already been use, the 99 represents that the number is not available. The end results would place either a valid number 1-20 or a 99 in each cell.
AK28:AZ28 is then copied and pasted (transposed) to BE35:BE50.
BE35:BE50 is then sorted low to high and examined to remove all 99's to leave me with just valid player numbers all at the top.
BE35:BE46 is then copied to Worksheet2(A8:A19). I only go to BE46 instead of BE50 because I know 4 players have already been selected. NOTE: It is very possible that several players may not have been available which resulted in 99's or what is now intended to be cleared or emptied cells being copied and brought forward.
The problem I am having is that the Worksheet2 formula {=combinations(A8:A19,4)} used to create all 495 potential combinations using the values in A8:A19 is seeing some kind of value in those cells which appear to be blank. The combination formula is putting a ZERO in where there should be nothing or a blank. And this is not only messing everything up... but it has really stumped me.
I've created a work around that occurs subsequent to this by looping thru and clearing the ZERO's but that adds a minimum of 5 seconds to the process.
Any thoughts on how to resolve this problem would be appreciated.
Thanks,
Don