just use the VLOOKUP function as follows
VariableToAdd
Application.WorksheetFunction.VLookup(str,range("A 1:B10"),2)
where str is your string and column A1 to A10 contains all the string
and cloumn B1 to B10 contain the numbers.
- Manges
--
Message posted from
http://www.ExcelForum.com