Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Does VBA have a function that will take rows and columns
arguments and return a string reference with letters and numbers?? For example, if I give the function row 1, column 1, then it should return "A1". (ie. function(1,1) returns "A1") Is there also an inverse of such a function, if it exists? thankx |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure exactly where you are going with this; but, if I can try and
anticipate where you are headed, Excel's VBA has two different ways to reference a cell, both of the following refer to A1... Range("A1") Cells(1, 1) or Cells(1, "A") whichever is more convenient. So, if you are asking how to create "A1" from row 1, column 1 numbers so you can create a reference to the cell using the Range property, you don't need to... just use the Cells method of referencing instead. However, if you really do need to form the text string... Address = Cells(1, 1).Address(0, 0) and to go the other way... Row = Range("A1").Row Column = Range("A1").Column -- Rick (MVP - Excel) "Robert Crandal" wrote in message ... Does VBA have a function that will take rows and columns arguments and return a string reference with letters and numbers?? For example, if I give the function row 1, column 1, then it should return "A1". (ie. function(1,1) returns "A1") Is there also an inverse of such a function, if it exists? thankx |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
You can use Cells(r,c) in your statements instead of Range("A1"), or if you really need the address: MyAddress=Cells(1,1).Address MyRow=Range("A1").Row MyCol=Range("A1").Column Regards, Per "Robert Crandal" skrev i meddelelsen ... Does VBA have a function that will take rows and columns arguments and return a string reference with letters and numbers?? For example, if I give the function row 1, column 1, then it should return "A1". (ie. function(1,1) returns "A1") Is there also an inverse of such a function, if it exists? thankx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I convert text string into a cell reference | Excel Discussion (Misc queries) | |||
Range of cells: Convert relative reference into absolute | Excel Discussion (Misc queries) | |||
Convert String to Function Reference | Excel Worksheet Functions | |||
Formulas that reference cells that reference another cell | Excel Discussion (Misc queries) | |||
How to get reference to a range as string? | Excel Programming |