Home |
Search |
Today's Posts |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Did you mean delete the **last** section (that is what your example shows)?
TheText = "found.untitled.bitmap" If InStr(TheText, ".") 0 Then TheNewText = Left(TheText, InStrRev(TheText, ".") - 1) End If Rick "Rivers" wrote in message ... wow that was fast guys that worked brilliantly i have another question if your up for it? how do i remove a section of a string to a point i.e "untitled.bitmap" to "untitled" i want to look for the "." and delete it plus everything after it. however the "." can appear multiple times within the string i just need to delete the first segment i.e "found.untitled.bitmap" ="found.untitled" thanks rivers "Lars-Ã…ke Aspelin" wrote: On Sun, 3 Aug 2008 09:02:00 -0700, Rivers wrote: is there a way to search a variable containing "mydoc.doc" for the "." and if found do the next line i tried if sel=*.* then but it doesnt work any ideas thanks Rivers Try this: Dim sel as String If InStr(sel, ".")0 Then ' this line is executed if there is a "." in the variable sel End If Hope this helps / Lars-Ã…ke |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Find" a wildcard as a place marker and "replace" with original va | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
find "Cancellation" in column "A" and copy all data from Columns B-F onto another Sheet | Excel Programming | |||
HELP on "left","right","find","len","substitute" functions | Excel Discussion (Misc queries) |