ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Asc character (https://www.excelbanter.com/excel-programming/308135-asc-character.html)

Trish[_3_]

Asc character
 
I have a string Ispace, I need to find what the position
is of the first and the second spaces within the string
are. Can someone help with the syntax. I have gotten the
if not question wrong and would appreciate any support:
Trish

Ispace = Trim(Right(ActiveCell, 10))

intI = 1
loop1:
If Not (Asc(Right(Ispace, intI), 32)) Then
intI = intI + 1
GoTo loop1
Else
Space = intI


Tom Ogilvy

Asc character
 
iloc = Instr(1,ActiveCell," ",vbTextCompare)
iloc1 = Instr(iloc+1,ActiveCell," ",vbTextCompare)

would be a basic approach.

--
Regards,
Tom Ogilvy

"Trish" wrote in message
...
I have a string Ispace, I need to find what the position
is of the first and the second spaces within the string
are. Can someone help with the syntax. I have gotten the
if not question wrong and would appreciate any support:
Trish

Ispace = Trim(Right(ActiveCell, 10))

intI = 1
loop1:
If Not (Asc(Right(Ispace, intI), 32)) Then
intI = intI + 1
GoTo loop1
Else
Space = intI




No Name

Asc character
 
I need to buy the book! But which one.
Thanks Tom
Regards
Trish
-----Original Message-----
iloc = Instr(1,ActiveCell," ",vbTextCompare)
iloc1 = Instr(iloc+1,ActiveCell," ",vbTextCompare)

would be a basic approach.

--
Regards,
Tom Ogilvy

"Trish" wrote in

message
...
I have a string Ispace, I need to find what the position
is of the first and the second spaces within the string
are. Can someone help with the syntax. I have gotten the
if not question wrong and would appreciate any support:
Trish

Ispace = Trim(Right(ActiveCell, 10))

intI = 1
loop1:
If Not (Asc(Right(Ispace, intI), 32)) Then
intI = intI + 1
GoTo loop1
Else
Space = intI



.



All times are GMT +1. The time now is 01:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com