ryanblything
New Member
- Joined
- Jun 27, 2018
- Messages
- 2
Hi,
I'd like to create a string of 6 random consonants (e.g., "kftryp") but with 2 caveats:
1. no letter repeats (e.g., you can't have "kftryk")
2. the string does not contain a consonant that is used in another specified cell (e.g., if the specified cell - A1 - contains "tiger" then "kftryp" is not suitable because it contains a "t" (so I need code that says "give me 6 unique consonants, and don't give me a consonant that is contained in e.g., cell A1).
I've figured out how to create a string of random consonants:
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)
but I don't know how to achieve the 2 caveats - any suggestions would be very much appreciated!
Thanks,
Ryan
I'd like to create a string of 6 random consonants (e.g., "kftryp") but with 2 caveats:
1. no letter repeats (e.g., you can't have "kftryk")
2. the string does not contain a consonant that is used in another specified cell (e.g., if the specified cell - A1 - contains "tiger" then "kftryp" is not suitable because it contains a "t" (so I need code that says "give me 6 unique consonants, and don't give me a consonant that is contained in e.g., cell A1).
I've figured out how to create a string of random consonants:
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)&
=MID("BCDFGHJKLMNPQRSTVWXYZ",RANDBETWEEN(1,21),1)
but I don't know how to achieve the 2 caveats - any suggestions would be very much appreciated!
Thanks,
Ryan