Forum Discussion
Westerby25
Jul 31, 2023Copper Contributor
RANDBETWEEN
I recently paid for a course in Excel.
Having personally contacted the author, I still can't get answers to the following two points.
I need to know HOW to achieve the following IF they are possible, or to be told one or both can't be done.
1. I want to use Relative or Absolute references in a RANDBETWEEN function.
2. Doing 100 loops in a Macro, I want to export the 100 answers into a COUNT function, either directly or indirectly.
Any help/suggestions welcome.
3 Replies
Sort By
- You can use formulas such as =RANDBETWEEN(A1, B1) and =RANDBETWEEN($A$1, $B$1)
- The result would be 100. What exactly do you want to accomplish?
- Westerby25Copper ContributorEXACTLY would take too long, but I need to solve 3 problems. The first is how to execute a RAND BETWEEN in a FOR LOOP where the RAND (from one of 6 Relative references would produce a number from an XLOOKUP table.
The second problem is after all the calculations in a series of LOOPS have been performed a single name relating to the sun of all the LOOKUPS (as in a race, the winner's name) can be exported to a list upon which the COUNT function can total the names.
I have never used VBA before but successfully achieved the required result in Turbo C on a VIC 20 about 300 years ago 🙂
That is what I am trying to replicate. I have had a few suggestions, all different, but with one thing in common - not one of them has run when I have copied into a Macro. Whether that is the solution being incorrect or not being explained FULLY, step by step, I do not know.
The third problem is not a problem as such. Whatever I try, I don't know even whether there is something wrong, or it is simply impossible in Excel.I'm afraid I don't have the slightest idea what you want. Please try to explain it in detail, providing concrete examples.