Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On 10/9/2019 2:01 PM, RG III wrote:
Const myStr = "The video shows that on 9/24/2019 the suspect entered the store." i = InStr(myStr, "/") myPos = InStrRev(myStr, " ", i) + 1 I suppose that works. It appears to just find the first "/" character in a string, is that right? Yes...not a very robust solution unless it can be assured the search string doesn't have other instances of slashes besides. And BTW, I made a typo in my above message. The format of the dates is "m/dd/yyyy" or "mm/dd/yyyy". You still have more work to do with the above even in the given case depending upon whether is one- or two-digit month so you've got to search back for the whitespace character before the characters before the first slash to get the actual beginning of the string, the second line in the above. I dunno VBA well enuf to know otomh--is there a regular expressions version of text search besides just simple string pattern matching? If so, would be way to go. -- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to find a text in a string without giving the position of the | Excel Discussion (Misc queries) | |||
Find Character Position in String | Excel Programming | |||
find nth position of a string | Excel Discussion (Misc queries) | |||
find position of a number in a string | Excel Worksheet Functions | |||
How find character position # in string from right end? Or how get range row num | Excel Programming |