#### Necroscope

##### Board Regular

- Joined
- Jul 7, 2004

- Messages
- 72

A1 and B1 have the numbers 100 and 199 in them. (It's a range of 100 ticket numbers.)

A2 and B2 have the numbers 500 and 599. (Another range of 100.)

In C1, I have typed in 120. What I want Excel to do is say that in order to meet the figure of 120, all tickets from the first batch need to be used and 20 tickets from the second batch need to be used. Ie ticket numbers 100 to 199 and 500 to 519 are used up.

The second part of the problem is that I'd also like to enter another number - for example 50 - and Excel would know to look at the available tickets from the second batch because the first batch is gone. I.e ticket numbers 520 to 569.

Is there a non-VBA way to do this?

TIA