Dice Roll

Monitor

New Member
Joined
Oct 20, 2013
Messages
11
I have tried many different functions to get a text response when I roll - 1,1,1,1,1 or 2,2,2,2,2 using five dice. The table has 100 rows and the numbers are random. I've tried if, Vlookup, Hlookup and or.
 
Or =IF(COUNTIF(A1:E1,A1)<>5,"Fail","Success") confirmed normally.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
... or 1 microsecond quicker
Now I'll finally have time to take that vacation ... :)

All variations are faster than my suggestion in post#8.
 
Upvote 0
There are only five cells total, why not eliminate all but the IF function call (or are the concatenations less efficient than using COUNTIF)?

=IF(A1&B1&C1&D1&E1=A1&A1&A1&A1&A1,"Hooray!","")
 
Upvote 0
There are only five cells total, why not eliminate all but the IF function call (or are the concatenations less efficient than using COUNTIF)?

=IF(A1&B1&C1&D1&E1=A1&A1&A1&A1&A1,"Hooray!","")

A​
B​
C​
D​
E​
F​
G​
1​
1​
11​
1​
1​
Hooray!F1: =IF(A1&B1&C1&D1&E1=A1&A1&A1&A1&A1,"Hooray!","")
 
Upvote 0

A​

B​

C​

D​

E​

F​

G​

1​

1​

11​

1​

1​
Hooray!
F1: =IF(A1&B1&C1&D1&E1=A1&A1&A1&A1&A1,"Hooray!","")

<TBODY>
</TBODY>
Wouldn't the random numbers the OP is generating to represent dice rolls be limited to the numbers 1 through 6?
 
Upvote 0
As a side note it's really a case to say "Hooray!"

There are 7776 permutations with repetition of 6 elements taken 5 at a time. This means that on average a row will display "Hooray!" only 1 out of 1000+ times.

I'd say it would be maybe to consider instead of one particular record displaying all the 5 numbers equal to consider if after you press F9 any of the 100 records displays the 5 numbers equal.

It would still only display "Hooray!" about 1 out of 13 times, but that's not so bad.
 
Upvote 0

Forum statistics

Threads
1,215,515
Messages
6,125,279
Members
449,220
Latest member
Excel Master

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