Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi:
Isthere a way to obtain the collumn letter (A) for example and hte row number (2) as separate variables. Any help apreciated. Sean. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Use the Row and Column properties of the range you are working with (with a
twist for the column letter). Assuming R is your range... RowNumber = R.Row ColumnNumber = R.Column ColumnLetter =Split(R.Address(1, 0), "$")(0) -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... Hi: Isthere a way to obtain the collumn letter (A) for example and hte row number (2) as separate variables. Any help apreciated. Sean. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
is there a reference to the Split function.
or could someone explain the line: ColumnLetter =Split(R.Address(1, 0), "$")(0) cheers Sean. Cheers Sean. "Rick Rothstein" wrote in message ... Use the Row and Column properties of the range you are working with (with a twist for the column letter). Assuming R is your range... RowNumber = R.Row ColumnNumber = R.Column ColumnLetter =Split(R.Address(1, 0), "$")(0) -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... Hi: Isthere a way to obtain the collumn letter (A) for example and hte row number (2) as separate variables. Any help apreciated. Sean. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Since you posted in the programming newsgroup, I assumed you wanted VBA
code. Split is a VB function that breaks a delimited string of text into an array of substrings (broken apart at the delimiter). You can see the help files for Split by placing the caret (text cursor) in or next to the word "split" and pressing F1. Most people will assign the output of the Split function to an array and then use that array to pull out one of the substring. Something like this... Dim Fields() As String Fields = Split(R.Address(1, 0), "$") ColumnLetter = Fields(0) My code bypassed assigning the output to an array and worked directly with the array produced by the Split function in memory... that is what the trailing (0) is for... it says to return the zero element of the array the Split function directly. -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... is there a reference to the Split function. or could someone explain the line: ColumnLetter =Split(R.Address(1, 0), "$")(0) cheers Sean. Cheers Sean. "Rick Rothstein" wrote in message ... Use the Row and Column properties of the range you are working with (with a twist for the column letter). Assuming R is your range... RowNumber = R.Row ColumnNumber = R.Column ColumnLetter =Split(R.Address(1, 0), "$")(0) -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... Hi: Isthere a way to obtain the collumn letter (A) for example and hte row number (2) as separate variables. Any help apreciated. Sean. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Cheers--it's a long time since I wrote any vb code!
Sean. "Rick Rothstein" wrote in message ... Since you posted in the programming newsgroup, I assumed you wanted VBA code. Split is a VB function that breaks a delimited string of text into an array of substrings (broken apart at the delimiter). You can see the help files for Split by placing the caret (text cursor) in or next to the word "split" and pressing F1. Most people will assign the output of the Split function to an array and then use that array to pull out one of the substring. Something like this... Dim Fields() As String Fields = Split(R.Address(1, 0), "$") ColumnLetter = Fields(0) My code bypassed assigning the output to an array and worked directly with the array produced by the Split function in memory... that is what the trailing (0) is for... it says to return the zero element of the array the Split function directly. -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... is there a reference to the Split function. or could someone explain the line: ColumnLetter =Split(R.Address(1, 0), "$")(0) cheers Sean. Cheers Sean. "Rick Rothstein" wrote in message ... Use the Row and Column properties of the range you are working with (with a twist for the column letter). Assuming R is your range... RowNumber = R.Row ColumnNumber = R.Column ColumnLetter =Split(R.Address(1, 0), "$")(0) -- Rick (MVP - Excel) "Sean Farrow" wrote in message ... Hi: Isthere a way to obtain the collumn letter (A) for example and hte row number (2) as separate variables. Any help apreciated. Sean. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Obtaining Unique Number From Data Validation List | Excel Discussion (Misc queries) | |||
Adding a number to a letter of the alphabet to get a letter | Excel Worksheet Functions | |||
counting if data from one collumn is present in another collumn | Excel Worksheet Functions | |||
change headers from letter to number/number to letter | Excel Worksheet Functions | |||
column header changed from letter to number, how return to letter | Excel Discussion (Misc queries) |