Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Can someone explain the difference between the two of these? Thanks!
|
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Andy wrote on Sat, 5 May 2007 05:25:00 -0700:
A Can someone explain the difference between the two of these? A Thanks! I don't seem to have LEFT$ in Excel 2002. When did it appear or disappear? There *is* LEFTB that refers to double byte characters like Chinese ones. James Silverton Potomac, Maryland E-mail, with obvious alterations: not.jim.silverton.at.comcast.not |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Left$ and Right$ and Mid$ and other string operators are "left over" from the
days of BASIC. Ron and Jon have explained their use quite well. LEFT, RIGHT etc are late comers to the world. As you note, James, there is no LEFT$, RIGHT$, MID$ for the worksheet itself, just in the innards of VB. "James Silverton" wrote: Andy wrote on Sat, 5 May 2007 05:25:00 -0700: A Can someone explain the difference between the two of these? A Thanks! I don't seem to have LEFT$ in Excel 2002. When did it appear or disappear? There *is* LEFTB that refers to double byte characters like Chinese ones. James Silverton Potomac, Maryland E-mail, with obvious alterations: not.jim.silverton.at.comcast.not |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
JLatham wrote on Sat, 5 May 2007 18:31:00 -0700:
Left$ and Right$ and Mid$ and other string operators are "left over" from the days of BASIC. Ron and Jon have explained their use quite well. LEFT, RIGHT etc are late comers to the world. J As you note, James, there is no LEFT$, RIGHT$, MID$ for the J worksheet itself, just in the innards of VB. Ah, you've jogged my memory; it was BASIC! I had a feeling that I had seen things like LEFT$ in computer languages of the dim past :-) I knew it wasn't Fortran, FOCAL, Algol or C but I had not thought of BASIC!! James Silverton Potomac, Maryland E-mail, with obvious alterations: not.jim.silverton.at.comcast.not |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I don't recall Excel having a LEFT$() worksheet function, BUT it is used in
VBA. Here's the differece (as I understand it) LEFT(string, num_chars) returns a VARIANT. But, in LEFT$(string, num_chars), the trailing dollar sign ($) declares the return value to be a STRING. It would make a difference if the 1st argument could be null. Example: In the immediate window of the VB Editor.... If you enter DEBUG.PRINT LEFT(NULL,3) This is returned: NULL But, if you enter DEBUG.PRINT LEFT$(NULL,3) you get this error: "Invalid use of null", because a STRING cannot be null. Does that help? *********** Regards, Ron XL2002, WinXP "Andy" wrote: Can someone explain the difference between the two of these? Thanks! |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
And the reason you'd use one or the other is that Left$ may be quicker if
all you're doing is manipulating strings, while Left would help if you're going to encounter the situation Ron describes. There are also such functions as Right$ and Mid$. - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions http://PeltierTech.com _______ "Ron Coderre" wrote in message ... I don't recall Excel having a LEFT$() worksheet function, BUT it is used in VBA. Here's the differece (as I understand it) LEFT(string, num_chars) returns a VARIANT. But, in LEFT$(string, num_chars), the trailing dollar sign ($) declares the return value to be a STRING. It would make a difference if the 1st argument could be null. Example: In the immediate window of the VB Editor.... If you enter DEBUG.PRINT LEFT(NULL,3) This is returned: NULL But, if you enter DEBUG.PRINT LEFT$(NULL,3) you get this error: "Invalid use of null", because a STRING cannot be null. Does that help? *********** Regards, Ron XL2002, WinXP "Andy" wrote: Can someone explain the difference between the two of these? Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
MID function from right to left | Excel Worksheet Functions | |||
left function | Excel Worksheet Functions | |||
Column labels run right to left, not left to right | Excel Discussion (Misc queries) | |||
Left function | Excel Discussion (Misc queries) | |||
How to change the right-to-left worksheet to left-to-right workshe | Excel Discussion (Misc queries) |