Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 6,582
Default Why doesn't INSTREV work for me?


"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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Why doesn't INSTREV work for me?

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Why doesn't INSTREV work for me?

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
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
extracting totals from 1 work sheet to another work work sheet cj Excel Discussion (Misc queries) 2 October 27th 07 10:54 PM
Counting dates in multiple work sheets and work books Savage Excel Discussion (Misc queries) 0 December 19th 05 11:41 PM
Is there away to keep "auto save" from jumping to the first work sheet in the work book? Marc New Users to Excel 2 April 21st 05 01:27 AM
simultaneously work in a work book with other users Sweets Excel Discussion (Misc queries) 1 April 18th 05 07:35 PM
Spin button in a work sheet - how do I make it work? [email protected] Excel Worksheet Functions 1 April 7th 05 08:43 PM


All times are GMT +1. The time now is 05:18 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"