View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default Delete cells with 0 as the tenth digit

On Sun, 08 Feb 2009 23:35:48 -0500, Ron Rosenfeld
wrote:

On Sun, 08 Feb 2009 23:26:32 -0500, Ron Rosenfeld
wrote:

=RegexSub(A1,"(\n|^).{9}0.*","")


Minor change in the formula:

=RegexSub(A1,"(\n|^).{9}0.*(\n|$)","")

(The UDF remains the same, but the pattern in the formula needed a small
change).

--ron


Further change, based on a critique by Rick:

=RegexSub(A1,"^.{9}0.*$[\n\r]","")

--ron