View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default If 5th character="-" delete everything to the left otherwise do no

=MID(A1,IF(MID(A1,5,1)="-",6,1),99)

Stated another way...

=MID(A1,1+5*(MID(A1,5,1)="-"),99)

--
Rick (MVP - Excel)