View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default How do I delete everything after a / in a column?

"Harlan Grove" wrote...
....
=REPLACE(A1,1,COUNTIF(A1,"*/*")*FIND("/",A1&"/"),"")

to return A1.

....

Might as well avoid a function call.

=REPLACE(A1&"/"&A1,1,FIND("/",A1&"/"),"")

not that the first concatenation is instantaneous. This would be a minor
time-storage trade-off.