If part of a cell = "NVA" then insert "Norfolk" in return cell
"RNCKWMN" wrote:
What formula or function do i use to make this happen?
=lookup(mid(C1,2,3), {"NVA","RVA","SNC"}, {"Norfolk","Richmond","Selma"})
That makes it simple to extend to additional codes. However, if need to
cover "none of the above", post back for additional assistance, specifying
your version of Excel.
----- original message -----
"RNCKWMN" wrote in message
...
Column C has various 8 character codes (city & state abbreviations). One #
and 7 alpha. If the 2nd, 3rd & 4th characters = "NVA" then I want it to
return "Norfolk" in a Column J... if they = "RVA" it should return
"Richmond"
Column C Column J
0NVARIVA should yield Norfolk
2RVACFVA should yield Richmond
1SNCEUNC should yield Selma
What formula or function do i use to make this happen?
|