ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Validation help (https://www.excelbanter.com/excel-programming/332162-validation-help.html)

robmeister[_3_]

Validation help
 

Hello All

I've created some code that looks through a range of nos. & then
displays a list of free nos. I've set the range up using validation as
below:
Case "Cardiff":
Range("C1") = "20000"
Range("D1") = "23499"

My problem is that the search looks for missing nos between these
ranges & if no. 20000 is free nothing is returned. What I'm wanting to
do is to add = option to the case but unsure how to do this.

Hope someone can help
Thanks


--
robmeister
------------------------------------------------------------------------
robmeister's Profile: http://www.excelforum.com/member.php...o&userid=24364
View this thread: http://www.excelforum.com/showthread...hreadid=380194


Leith Ross[_47_]

Validation help
 

Hello Robmeister,

This is a instance where you have to use an IF ... THEN Statement.
Select Case is designed to test a single expression against multiple
values. You need to test 2 expressions simultaneously. Looks like
you'll have to do some work on your code. Hope this helps you some with
solving the problem.

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=380194



All times are GMT +1. The time now is 03:11 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com