What about something like this? I think it will work, if i understood your conditions correctly

Code:
 $nums = "1234567890"
$letters = "SNKEHMRL"
$computer = "S123N56"
$computerName = "Failed"
$stillGood = 1
if instr("WLS", left($computer, 1)) and len($computer) = 7
if left($computer, 1) = "S"
for $j = 2 to 4
if not instr($nums, substr($computer, $j, 1))
$stillGood = 0
endif
next

for $j = 6 to 7
if not instr($nums, substr($computer, $j, 1))
$stillGood = 0
endif
next

if instr($letters, substr($computer, 5, 1)) and $stillGood
$computerName = "Store"
endif
else
for $j = 2 to 7
if not instr($nums, substr($computer, $j, 1))
$stillGood = 0
endif
next
if $stillGood
$computerName = "Corp"
endif
endif
endif

? $computerName


_________________________
Eric