View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Globally deleting part of the information in a cell

Sub deletepastperiodincell()
For Each c In Range("g1:g11")
x = InStr(CStr(c), ".")
If x 0 Then c.Value = Left(c, x - 1)
Next c
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JanetP" wrote in message
...
I have many rows of data. In several cells, the end of the data in the
cell
ends with a period, some numbers and an x. So the information to be
deleted
would like something like .035x where 035 could be any number. Since
there
is other data in any given cell, I would like to delete everything in a
cell
from the period and anything following it.
Is there a way to do that?