Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I'm using INSTREV to retrieve the location of a character in a string by
searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 21 Feb 2008 06:20:03 -0800, dsimcox
wrote: I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? Yes. Although it starts looking from the end of the string, it still gives the position numbered from the beginning of the string. ?InStrRev("12-34567-89", "-") would give an answer of 9. --ron |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ron, if you haven't already done so, you should read the sub-thread started
by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick "Ron Rosenfeld" wrote in message ... On Thu, 21 Feb 2008 06:20:03 -0800, dsimcox wrote: I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? Yes. Although it starts looking from the end of the string, it still gives the position numbered from the beginning of the string. ?InStrRev("12-34567-89", "-") would give an answer of 9. --ron |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)"
wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Thanks for the tip, Rick. This is not the first time that I have felt ignored. I will check out that link. --ron |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
who said that? <g
"Ron Rosenfeld" wrote: On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)" wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Thanks for the tip, Rick. This is not the first time that I have felt ignored. I will check out that link. --ron |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I just looked back on the link you posted earlier... Ron is still not in the
original thread, but his latest post shows up in the new thread... strange. By the way, this is the first time I have really looked a web newsreader... what a horrible interface it provides... the same thread is broken up into two (so far) separate threads even though the subject is the same and the newer thread is really just a continuation of the older one. How does anyone follow a continuous thread of posts if the (web) newsreader is breaking them into separate threads with on apparent (at least to me) rhyme or reason? Rick "Mike H" wrote in message ... who said that? <g "Ron Rosenfeld" wrote: On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)" wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Thanks for the tip, Rick. This is not the first time that I have felt ignored. I will check out that link. --ron |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)"
wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Nothing is apparent, although obviously you were able to see my post using your newsreader and not going through the web version. I have sent a tech support email to Forte (I use Agent as my newsreader) and I'll see what they say. Whatever it is, it seems to be only an intermittent problem. I notice that although my first response to the OP did not show up, others of my responses did. In addition, your post to me shows up on the MS newsgroup as a blank post from an unknown person! --ron |
#8
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Curiouser & Curiouser the starter of this thread - presunably Rick - is
showing up as 'Unknown' to me. Clearly we have a gremlin of; as yet, indeterminate origin Mike "Ron Rosenfeld" wrote: On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)" wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Nothing is apparent, although obviously you were able to see my post using your newsreader and not going through the web version. I have sent a tech support email to Forte (I use Agent as my newsreader) and I'll see what they say. Whatever it is, it seems to be only an intermittent problem. I notice that although my first response to the OP did not show up, others of my responses did. In addition, your post to me shows up on the MS newsgroup as a blank post from an unknown person! --ron |
#9
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
The "starter of the thread" was actually Ron... my message was a response to
his posting (the one I can see, but that you can't see)... since the web newsreader didn't/can't see his message, I guess it isn't sure who I was answering, but why call **me** the "unknown person"... it should know who I am as it can see my entire posting. Rick "Mike H" wrote in message ... Curiouser & Curiouser the starter of this thread - presunably Rick - is showing up as 'Unknown' to me. Clearly we have a gremlin of; as yet, indeterminate origin Mike "Ron Rosenfeld" wrote: On Thu, 21 Feb 2008 11:32:46 -0500, "Rick Rothstein \(MVP - VB\)" wrote: Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Rick Nothing is apparent, although obviously you were able to see my post using your newsreader and not going through the web version. I have sent a tech support email to Forte (I use Agent as my newsreader) and I'll see what they say. Whatever it is, it seems to be only an intermittent problem. I notice that although my first response to the OP did not show up, others of my responses did. In addition, your post to me shows up on the MS newsgroup as a blank post from an unknown person! --ron |
#10
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Ron, if you haven't already done so, you should read the sub-thread
started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Nothing is apparent, although obviously you were able to see my post using your newsreader and not going through the web version. I have sent a tech support email to Forte (I use Agent as my newsreader) and I'll see what they say. Whatever it is, it seems to be only an intermittent problem. I notice that although my first response to the OP did not show up, others of my responses did. In addition, your post to me shows up on the MS newsgroup as a blank post from an unknown person! Yes, I just saw that and I posted a message back to Mike commenting what a horrible interface the web newsreader provides. Not only is the new thread shown as started by an unknown person (what is with that?), the thread is totally separated from the original thread of which it is a part... my question was, how does anyone follow a threaded set of postings if the (web) newsreader is breaking them apart with no apparent rhyme or reason? Rick |
#11
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
On Thu, 21 Feb 2008 12:55:55 -0500, "Rick Rothstein \(MVP - VB\)"
wrote: Yes, I just saw that and I posted a message back to Mike commenting what a horrible interface the web newsreader provides. Not only is the new thread shown as started by an unknown person (what is with that?), the thread is totally separated from the original thread of which it is a part... my question was, how does anyone follow a threaded set of postings if the (web) newsreader is breaking them apart with no apparent rhyme or reason? Rick Poorly? --ron |
#12
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() "Rick Rothstein (MVP - VB)" wrote in message ... Ron, if you haven't already done so, you should read the sub-thread started by Mike H... it seems that you posting is not visible in Microsoft's online newsreader.... http://www.microsoft.com/office/comm...ang=e n&cr=US I'm not sure why, or if this is an ongoing problem with your postings or not, but you might want to try and discover why. Nothing is apparent, although obviously you were able to see my post using your newsreader and not going through the web version. I have sent a tech support email to Forte (I use Agent as my newsreader) and I'll see what they say. Whatever it is, it seems to be only an intermittent problem. I notice that although my first response to the OP did not show up, others of my responses did. In addition, your post to me shows up on the MS newsgroup as a blank post from an unknown person! Yes, I just saw that and I posted a message back to Mike commenting what a horrible interface the web newsreader provides. Not only is the new thread shown as started by an unknown person (what is with that?), the thread is totally separated from the original thread of which it is a part... my question was, how does anyone follow a threaded set of postings if the (web) newsreader is breaking them apart with no apparent rhyme or reason? Rick It's a terrible interface, and each revision makes it worse. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ |
#13
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
That is the way the InStrRev function works... it simply performs its search
for your specified character from the right to left, but it tells you which character position in the text, counting from the left, the search character is located at... it is **not** a Right function replacement of any kind. I'm guessing from your question that you are trying to isolate the characters after the last dash. Just use the Mid function omitting the optional 3rd argument... Text = "1234567-89" LastDashLocation = InStrRev(Text, "-") ? Mid$(Text, LastDashLocation + 1) or, in one step... ? Mid$("1234567-89", InStrRev(Text, "-") + 1) Rick "dsimcox" wrote in message ... I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? |
#14
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi,
It is working for you, it returns the position of the last occurence of the search character not the position from the right hand side Try this myposition = Len("1234567-89") - (InStrRev("1234567-89", "-", -1, vbBinaryCompare) - 1) Mike "dsimcox" wrote: I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? |
#15
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you, Rick and Mike.
That possiblity never occurred to me. I understand how it works now - but I think I would have designed it to work the other way! Appreciate you help this morning. "Mike H" wrote: Hi, It is working for you, it returns the position of the last occurence of the search character not the position from the right hand side Try this myposition = Len("1234567-89") - (InStrRev("1234567-89", "-", -1, vbBinaryCompare) - 1) Mike "dsimcox" wrote: I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? |
#16
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Morning? it may be for you!! Thanks for the feedback.
"dsimcox" wrote: Thank you, Rick and Mike. That possiblity never occurred to me. I understand how it works now - but I think I would have designed it to work the other way! Appreciate you help this morning. "Mike H" wrote: Hi, It is working for you, it returns the position of the last occurence of the search character not the position from the right hand side Try this myposition = Len("1234567-89") - (InStrRev("1234567-89", "-", -1, vbBinaryCompare) - 1) Mike "dsimcox" wrote: I'm using INSTREV to retrieve the location of a character in a string by searching from the end of the string. When I type the following in the immediate window: ?InStrRev("1234567-89", "-") I get an answer of 8. I was expecting 3. (The position of the "-" is 3 characters from the right-hand side of the string) Am I interpreting this incorrectly? |
#17
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thank you, Rick and Mike.
Do you have something against Ron?<g (He also answered you.) That possiblity never occurred to me. I understand how it works now - but I think I would have designed it to work the other way! That would make working with it rather difficult I would think, especially in situations where both the InStr and InStrRev functions were used in the same expression. My guess is that you are thinking that because of the immediate use you need to put it to and are not looking at the "bigger picture" of the situations where it can be used at. Rick |
#18
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Rick,
Do you have something against Ron?<g (He also answered you.) Clearly we have a posting problem because the only answers I see are from you and I, nothing from Ron? Mike "Rick Rothstein (MVP - VB)" wrote: Thank you, Rick and Mike. Do you have something against Ron?<g (He also answered you.) That possiblity never occurred to me. I understand how it works now - but I think I would have designed it to work the other way! That would make working with it rather difficult I would think, especially in situations where both the InStr and InStrRev functions were used in the same expression. My guess is that you are thinking that because of the immediate use you need to put it to and are not looking at the "bigger picture" of the situations where it can be used at. Rick |
#19
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Do you have something against Ron?<g (He also answered you.)
Clearly we have a posting problem because the only answers I see are from you and I, nothing from Ron? My newsreader shows Ron Rosenfeld as the first responder to this thread (his message was posted approximately 4 minutes before mine was). Rick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
extracting totals from 1 work sheet to another work work sheet | Excel Discussion (Misc queries) | |||
Counting dates in multiple work sheets and work books | Excel Discussion (Misc queries) | |||
Is there away to keep "auto save" from jumping to the first work sheet in the work book? | New Users to Excel | |||
simultaneously work in a work book with other users | Excel Discussion (Misc queries) | |||
Spin button in a work sheet - how do I make it work? | Excel Worksheet Functions |