Most valuable professional
  • Hot Topics

Excel checking each cell in an array whether it satisfies a condition

So, let's say I need to have 24 numbers randomized. But in a particular way! They all should be chaotically randomized according to these rules: half of them (12 cells) should be randomized between 10-60 the rest (also 12 cells) between 80-90 so there's a gap between of 61-79 values, they are to be excluded but(!) you want to have 12 cells that would lie between 10-60, and the rest between 80-90 And it should be done with a single formula, that is, you can't have a formula Code: 24 in first 12 cells (which already breaks the rules, because you don't want to have first 12 cells to be randomized between 10-60, but rather the amount of cells containing the values between 10-60, which are spread out randomly in an array), and then Code: 87 in the remainder of the cells. "Search" function returns the position of a character in a text... totally not what I need. I need a formula that would check each cell in an array/selection on whether it satisfies the condition of being more than 60. Or is there a way to solve it by using simple formulas? Also, randbetween has to be used here, so please don't suggest advices that do not involve using this formula. Last edited by vizakenjack; Yesterday at 03:11 AM.

This question generated 8 answers. To proceed to the answers, click here.

This thread is current as of October 19, 2014.

For more resources for Microsoft Excel:

This article includes the following tags:

  • Excel
  • Microsoft Excel