T
Tom Morris
I'm developing a spreadsheet that take room names such as "Classroom
101" or "Storage", and
assigns to it a specific room type that is in turn used in a lookup
function.
Problem is, different users will enter in names differently, some will
abreviate "Clas. 101" or "Stor." for example.
One way in which I'm trying to save time from selecting the room type
from a drop down list is to
write a VBA program that will try to guess at what type of room the
user entered, I'm trying to use this structure:
Select Case Range ("A1").Text
Case "Cla" To "Clb"
Range ("B1").Value = "Classroom"
Case "Sto" To "Stp"
Range ("B1").Value = "Storage"
Case Else
Range ("B1").Value = "Select Room Type From Pull-Down Menu"
End Select
1) Is this a reasonable approach?
2) Is there not a way to look for any instance of the string pattern
"Cla" so that if a user enters "101 classroom", I can deal with that?
3) If this is a reasonable approach, what form will the "Range" object
form take so that I can loop through about 30 rows of rooms?
Thanks for Helping!!
Tom Morris
101" or "Storage", and
assigns to it a specific room type that is in turn used in a lookup
function.
Problem is, different users will enter in names differently, some will
abreviate "Clas. 101" or "Stor." for example.
One way in which I'm trying to save time from selecting the room type
from a drop down list is to
write a VBA program that will try to guess at what type of room the
user entered, I'm trying to use this structure:
Select Case Range ("A1").Text
Case "Cla" To "Clb"
Range ("B1").Value = "Classroom"
Case "Sto" To "Stp"
Range ("B1").Value = "Storage"
Case Else
Range ("B1").Value = "Select Room Type From Pull-Down Menu"
End Select
1) Is this a reasonable approach?
2) Is there not a way to look for any instance of the string pattern
"Cla" so that if a user enters "101 classroom", I can deal with that?
3) If this is a reasonable approach, what form will the "Range" object
form take so that I can loop through about 30 rows of rooms?
Thanks for Helping!!
Tom Morris