PC Review


Reply
Thread Tools Rate Thread

Character symbol meaning

 
 
Liz
Guest
Posts: n/a
 
      14th May 2009
Hi -
Can someone tell me what the "^" symbol in the below variables is? Is this a
symbol for space or end of line?

lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
"")))
lasti = .Find("^", lastw) + 1

Thanks,
Liz
 
Reply With Quote
 
 
 
 
Gary''s Student
Guest
Posts: n/a
 
      14th May 2009
In formulas, it represents to the operator to raise a value to a power:

=7^3
same as
=7*7*7
same as
343
--
Gary''s Student - gsnu200852


"Liz" wrote:

> Hi -
> Can someone tell me what the "^" symbol in the below variables is? Is this a
> symbol for space or end of line?
>
> lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> "")))
> lasti = .Find("^", lastw) + 1
>
> Thanks,
> Liz

 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      14th May 2009
In your case it is a text character....

In Ms Excel the 'Caret' operator is raise to the power of ....

=3^2

is 3 raised to the power of 2 which is 9


If this post helps click Yes
---------------
Jacob Skaria


"Liz" wrote:

> Hi -
> Can someone tell me what the "^" symbol in the below variables is? Is this a
> symbol for space or end of line?
>
> lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> "")))
> lasti = .Find("^", lastw) + 1
>
> Thanks,
> Liz

 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      14th May 2009
Thank you Gary. Can it mean something different for a string? I have a
string in this cell and not sure what these variables are doing....I know
they are supposed to find the last word in the cell and extract it.

Thanks,
Liz

"Gary''s Student" wrote:

> In formulas, it represents to the operator to raise a value to a power:
>
> =7^3
> same as
> =7*7*7
> same as
> 343
> --
> Gary''s Student - gsnu200852
>
>
> "Liz" wrote:
>
> > Hi -
> > Can someone tell me what the "^" symbol in the below variables is? Is this a
> > symbol for space or end of line?
> >
> > lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> > "")))
> > lasti = .Find("^", lastw) + 1
> >
> > Thanks,
> > Liz

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      14th May 2009
The code is attempting to locate the location within the text assigned to
the variable 'str2'. This section (in the assignment to 'lastw')...

Len(str2) - Len(.Substitute(str2, " ", > ""))

counts the number of spaces in the original text (it does this by finding
the difference between the length of the original text and the text with all
its spaces removed. Then the code uses this number (of spaces) in the
worksheet's Substitute function to replace the last space with a "^" symbol.
This code then assigns the original text with the last space changed to a
"^" symbol to the 'lastw' variable. The next line then locates the "^"
symbol (using the worksheet's Find function) and returns that position
number to the 'lasti' variable.

Okay, that is what the code is doing... the "^" symbol has no special
meaning... any character that would be found in the original text would work
as well. Just so you know, the code you posted is not an efficient way to
locate the last space in a text string. Here is how I would do it with a
single line of code...

lasti = InStrRev(str2, " ") + 1

--
Rick (MVP - Excel)


"Liz" <(E-Mail Removed)> wrote in message
news:988C6999-3F55-4B8B-BD72-(E-Mail Removed)...
> Hi -
> Can someone tell me what the "^" symbol in the below variables is? Is this
> a
> symbol for space or end of line?
>
> lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> "")))
> lasti = .Find("^", lastw) + 1
>
> Thanks,
> Liz


 
Reply With Quote
 
FSt1
Guest
Posts: n/a
 
      14th May 2009
hi
without seeing the rest of your code, i'm guessing but..... it appears that
its a marker of some sort because after the substituting in the frist line,
the second line tries to find the marker and then adds 1 to what ever the
find returns.

like i said...wild guessing here.

Regards
FSt1

"Liz" wrote:

> Thank you Gary. Can it mean something different for a string? I have a
> string in this cell and not sure what these variables are doing....I know
> they are supposed to find the last word in the cell and extract it.
>
> Thanks,
> Liz
>
> "Gary''s Student" wrote:
>
> > In formulas, it represents to the operator to raise a value to a power:
> >
> > =7^3
> > same as
> > =7*7*7
> > same as
> > 343
> > --
> > Gary''s Student - gsnu200852
> >
> >
> > "Liz" wrote:
> >
> > > Hi -
> > > Can someone tell me what the "^" symbol in the below variables is? Is this a
> > > symbol for space or end of line?
> > >
> > > lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> > > "")))
> > > lasti = .Find("^", lastw) + 1
> > >
> > > Thanks,
> > > Liz

 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      14th May 2009
> Okay, that is what the code is doing... the "^" symbol has no special
> meaning... any character that would be found in the original text would
> work as well.


I left out the word "not" in the above description; it should have read...

"Okay, that is what the code is doing... the "^" symbol has no special
meaning... any character that would ***NOT*** be found in the
original text would work as well."

--
Rick (MVP - Excel)


"Rick Rothstein" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> The code is attempting to locate the location within the text assigned to
> the variable 'str2'. This section (in the assignment to 'lastw')...
>
> Len(str2) - Len(.Substitute(str2, " ", > ""))
>
> counts the number of spaces in the original text (it does this by finding
> the difference between the length of the original text and the text with
> all its spaces removed. Then the code uses this number (of spaces) in the
> worksheet's Substitute function to replace the last space with a "^"
> symbol. This code then assigns the original text with the last space
> changed to a "^" symbol to the 'lastw' variable. The next line then
> locates the "^" symbol (using the worksheet's Find function) and returns
> that position number to the 'lasti' variable.
>
> Okay, that is what the code is doing... the "^" symbol has no special
> meaning... any character that would be found in the original text would
> work as well. Just so you know, the code you posted is not an efficient
> way to locate the last space in a text string. Here is how I would do it
> with a single line of code...
>
> lasti = InStrRev(str2, " ") + 1
>
> --
> Rick (MVP - Excel)
>
>
> "Liz" <(E-Mail Removed)> wrote in message
> news:988C6999-3F55-4B8B-BD72-(E-Mail Removed)...
>> Hi -
>> Can someone tell me what the "^" symbol in the below variables is? Is
>> this a
>> symbol for space or end of line?
>>
>> lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, "
>> ",
>> "")))
>> lasti = .Find("^", lastw) + 1
>>
>> Thanks,
>> Liz

>


 
Reply With Quote
 
Liz
Guest
Posts: n/a
 
      14th May 2009
Thank you all!
Rick, I really appreciate your explanation and assistance in an alternative.

"Rick Rothstein" wrote:

> The code is attempting to locate the location within the text assigned to
> the variable 'str2'. This section (in the assignment to 'lastw')...
>
> Len(str2) - Len(.Substitute(str2, " ", > ""))
>
> counts the number of spaces in the original text (it does this by finding
> the difference between the length of the original text and the text with all
> its spaces removed. Then the code uses this number (of spaces) in the
> worksheet's Substitute function to replace the last space with a "^" symbol.
> This code then assigns the original text with the last space changed to a
> "^" symbol to the 'lastw' variable. The next line then locates the "^"
> symbol (using the worksheet's Find function) and returns that position
> number to the 'lasti' variable.
>
> Okay, that is what the code is doing... the "^" symbol has no special
> meaning... any character that would be found in the original text would work
> as well. Just so you know, the code you posted is not an efficient way to
> locate the last space in a text string. Here is how I would do it with a
> single line of code...
>
> lasti = InStrRev(str2, " ") + 1
>
> --
> Rick (MVP - Excel)
>
>
> "Liz" <(E-Mail Removed)> wrote in message
> news:988C6999-3F55-4B8B-BD72-(E-Mail Removed)...
> > Hi -
> > Can someone tell me what the "^" symbol in the below variables is? Is this
> > a
> > symbol for space or end of line?
> >
> > lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2, " ",
> > "")))
> > lasti = .Find("^", lastw) + 1
> >
> > Thanks,
> > Liz

>
>

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      14th May 2009
it used to, in very early versions of Excel, to indicate alignment. Where a
single quote ' meant align left and a cap, ^, meant align centre.
In your code, the ^ replaces the spaces in the text. Maybe there's some
issue whereby spaces aren't legitimate.....for example where the text is
used to create a range name (mind you, ^ isn't legal either!)


"FSt1" <(E-Mail Removed)> wrote in message
newsBD38DEC-A0BD-400F-A8B7-(E-Mail Removed)...
> hi
> without seeing the rest of your code, i'm guessing but..... it appears
> that
> its a marker of some sort because after the substituting in the frist
> line,
> the second line tries to find the marker and then adds 1 to what ever the
> find returns.
>
> like i said...wild guessing here.
>
> Regards
> FSt1
>
> "Liz" wrote:
>
>> Thank you Gary. Can it mean something different for a string? I have a
>> string in this cell and not sure what these variables are doing....I know
>> they are supposed to find the last word in the cell and extract it.
>>
>> Thanks,
>> Liz
>>
>> "Gary''s Student" wrote:
>>
>> > In formulas, it represents to the operator to raise a value to a power:
>> >
>> > =7^3
>> > same as
>> > =7*7*7
>> > same as
>> > 343
>> > --
>> > Gary''s Student - gsnu200852
>> >
>> >
>> > "Liz" wrote:
>> >
>> > > Hi -
>> > > Can someone tell me what the "^" symbol in the below variables is? Is
>> > > this a
>> > > symbol for space or end of line?
>> > >
>> > > lastw = .Substitute(str2, " ", "^", Len(str2) - Len(.Substitute(str2,
>> > > " ",
>> > > "")))
>> > > lasti = .Find("^", lastw) + 1
>> > >
>> > > Thanks,
>> > > Liz


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
meaning of heart symbol on ALT+Pagedown Ron B Microsoft Excel Misc 2 15th Feb 2009 07:56 PM
What is the meaning of symbol & in FrontPage =?Utf-8?B?Q29tcHV0ZXIgbG9nb24gcGFzc3dvcmQ=?= Microsoft Frontpage 7 28th Apr 2007 05:11 AM
What is the meaning of i circled symbol in sent mail folder =?Utf-8?B?d2F0ZXJjcmF6ZWQ=?= Microsoft Outlook 1 27th Feb 2005 09:47 PM
Meaning of Symbol (Icon) in Sent Folder =?Utf-8?B?TGVhbm5l?= Microsoft Outlook 1 20th Oct 2004 09:20 PM
Meaning of Symbol (Icon) in Sent Folder =?Utf-8?B?TGVhbm5l?= Microsoft Outlook 0 20th Oct 2004 08:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:54 PM.