Juggler_IN
Active Member
- Joined
- Nov 19, 2014
- Messages
- 349
- Office Version
- 2003 or older
- Platform
- Windows
I want to calculate a value (x) using factorials for any given word (w) as per the following logic:
For example,
if w=BOB then, x = 3!/(2!1!) --- BOB has three letters (3!) with B twice (2!) and O once (1!);
if w=ABE then, x = 3!/(1!1!1!) --- ABE has three letters (3!) with A once (1!), B once (1!), and E once (1!);
if w=ABBA then, x = 4!/(2!2!) --- ABBA has four letters (4!) with A twice (2!) and B twice (2!);
Is there a way to execute and output x for any w input?
For example,
if w=BOB then, x = 3!/(2!1!) --- BOB has three letters (3!) with B twice (2!) and O once (1!);
if w=ABE then, x = 3!/(1!1!1!) --- ABE has three letters (3!) with A once (1!), B once (1!), and E once (1!);
if w=ABBA then, x = 4!/(2!2!) --- ABBA has four letters (4!) with A twice (2!) and B twice (2!);
Is there a way to execute and output x for any w input?