ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Any fast method to parse a string into row & col information (https://www.excelbanter.com/excel-programming/307468-any-fast-method-parse-string-into-row-col-information.html)

Nick

Any fast method to parse a string into row & col information
 
Hi,

Given a string "AC19", any method to split the string into "AC" and
"19", without using string methods?

Thx

Nick

K Dales

Any fast method to parse a string into row & col information
 
Hard to do anything to a string without using string
methods! (I assume you mean functions).

-----Original Message-----
Hi,

Given a string "AC19", any method to split the string

into "AC" and
"19", without using string methods?

Thx

Nick
.


No Name

Any fast method to parse a string into row & col information
 
What about the LEFT() and RIGHT() functions? They take a
string expression and get a certain number of charaters
from the left or the right.



-----Original Message-----
Hi,

Given a string "AC19", any method to split the string

into "AC" and
"19", without using string methods?

Thx

Nick
.


Bernie Deitrick

Any fast method to parse a string into row & col information
 
Nick,

You can use the sub and function below.

HTH,
Bernie
MS Excel MVP

Sub ShowColumnLetter()
Dim myAddress As String
myAddress = "AC19"

MsgBox "Column and row for cell " & myAddress & _
" are " & ColumnLetter(myAddress) & _
" and " & Range(myAddress).Row & "."
End Sub

Function ColumnLetter(myAdd As String) As String
Dim LastColLtr As String
LastColLtr = Range(myAdd).Address
ColumnLetter = Mid(LastColLtr, 2, InStr(2, LastColLtr, "$") - 2)
End Function


"Joe" wrote in message
...
Not that I know of. If you had "AD,19", then you could use the Split

function.

"Nick" wrote:

Hi,

Given a string "AC19", any method to split the string into "AC" and
"19", without using string methods?

Thx

Nick





All times are GMT +1. The time now is 03:10 AM.

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