How do I find a dash in a cell with numbers in it in excel.
If you only want the first 5 digits and they are always before the dash, why
not just pull them out directly...
=LEFT(A14,5)
If you want to use this across cells that might be blank...
=IF(A14="","",LEFT(A14,5))
--
Rick (MVP - Excel)
"Finky" wrote in message
...
I'm working in Excel 2003 with zip codes, people supply them in 5 digit, 9
digit or 9 digit with dash. I used
=IF(FIND("-",(A14))0,LEFT(A14,FIND("-",(A14))-1),A14) to get the 5 digit
but
if there is no dash it will value out. Does anyone know how I can test the
cell for the dash first.
|