View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Converting RIC1 code to letter Column/Numeric Row

use
Range("a1").select
or
cells(1,1).select
or
cells(rowno,colno).select

But it's very unlikely that you have to select the range to work with it.

Instead of:
cells(rowno,colno).select
selection.numberformat = "@"
selection.value = "Hi"

you could use
cells(rowno,colno).numberformat = "@"
cells(rowno,colno).value = "Hi"

or
with cells(rowno,colno)
.numberformat = "@"
.value = "Hi"
end with
(to save some typing and make it easier to read/debug.)




RidgeView wrote:

Hi...Thanks for responding....
An example that comes to mind is "Range("A1").Select". If I try to change
it to "Range(Cells(1, 1)).Select", Excel will immediately go into a "Debug"
state. I have a macro now that could use a variable such as
"Range(Cells(RowNo,ColNo)).Select" as well as the "Current Active Cell". I
fairly new using VBA macros but a former programmer.
Thanks again...

"Shane Devenshire" wrote:

Hi,

You can use A1 notation instead of R1C1 notation anytime you want. So I'm
not sure what you want - please give us an example of what you want.


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"RidgeView" wrote:

There must be an easy way to make cell "numeric row"/"numeric column" (R1C1
notation) to "Alpha Row"/Numeric Column" (e.g. "B3") format. There are macro
statements that require the latter and it would be nice to use a variable for
those cell locations especially when the active cell is required.
Thanks.....


--

Dave Peterson