View Single Post
  #6   Report Post  
Kiffar Kiffar is offline
Junior Member
 
Posts: 5
Default

It looks like that would work in concept. Here's the actual sheet I'm working on (In Excel 2007): https://rapidshare.com/files/3231189247/Combat.xlsm

What I've been referring to as C1 and C2 are actually the pink and green numbers in columns K and W. Those numbers are simply autosums of K2: K26 and W2: W26, respectively. How each of those cells calculates its value is not currently decided with certainty (and in fact, has changed since I've uploaded the sample and began writing this, and likely will again). What is known, which hopefully is sufficient for the discussion at hand, is that all of K2: K26 and W2: W26 will be calculated the same way. Additionally, it is certain that the random number component for each row will always be either a number from 1-20 (columns I and Y), or a manually entered value in the adjacent column (J and X). Are there any changes I should be aware of that if made would throw of the probability calculations? One notable thing that could change is the addition of more columns and rows, would macros written for the sheet automatically change the cells they refer to in order to accommodate the same way cell functions do?

For simplification I had cut out some of the range classifications, the full list is =.4, =.2, =.1, =.05, -.05, -.1, -.2, -.4, and =<-.4 You can see in the middle where each classification will go, under chance of victory. The chance of defeat section will simply be a mirror of the chance of victory section using linked cells. I'm leaning towards deleting it though, if it matters. The decimals will be displayed as percentages, I had intended to simply do that via the cell format menu. 5% through negative 5% is a stalemate, 5 through 9.99~ is marginal, etc.

Note that the percentage difference calculation in the middle is showing the results for the current engagement is an =abs function to always turn the result into a positive number. Thus the probability calculations should use ($J$27-$W$27)/(($J$27+$W$27)/2) rather than referring to M34.

I've switched off Excel's automatic formula recalculation for now, so that it only recalculates random numbers when I press F9. However, it seems this is a global setting that will apply to all sheets. It is desirable to have the randomly generated numbers and probabilities not change unless manually refreshed for this specific worksheet only, so would it be possible to replace =randbetween() with a macro? Would it be possible to make a refresh button on the sheet labeled "New Match"?

Edit: updated to a more current file

Last edited by Kiffar : November 17th 12 at 02:42 PM