Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 333
Default Instr

Hi,

How would I catch the error if the string does not have a space in it and
save the value as it is in that case?

For iCtr = 2 To OldLusedrow
OldString = ws.Range("B" & iCtr).Value
ws.Range("A" & iCtr).Value = Left(OldString, InStr(OldString, "
") - 1)
Next

--
Thanks for your help.
Karen53
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Instr ranswert Excel Programming 2 February 8th 08 12:55 PM
instr() ? mark kubicki Excel Programming 3 November 16th 06 05:07 PM
InStr Harley Excel Programming 3 August 9th 05 08:55 PM
InStr FGM Excel Programming 3 July 14th 05 08:47 PM
InStr and ADO Al Excel Programming 2 June 17th 04 04:22 PM


All times are GMT +1. The time now is 02:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"