Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Converting RIC1 code to letter Column/Numeric Row

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.....
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default Converting RIC1 code to letter Column/Numeric Row

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.....

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Converting RIC1 code to letter Column/Numeric Row

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.....

  #4   Report Post  
Posted to microsoft.public.excel.misc
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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 857
Default Converting RIC1 code to letter Column/Numeric Row

Hi,

As Dave has implied we use

Cells(1,1) to indicate A1. You do not need to modifiy it with the Range
method.

Sometimes you might choose to do this

Range(Cells(1,1),Cells(2,2)).Select

If there was any reason, and there is none, you could use

Range(Cells(1,1).Address).Select

The active cell is call the ActiveCell and can be used like this

ActiveCell.Offset(1,0).Select

This code moves the cursor down on cell in the same column. Or

ActiveCell.Select

This code collapses the selected range down to the active cell.

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

Cheers,
Shane Devenshire


"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.....



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 21
Default Converting RIC1 code to letter Column/Numeric Row

Thanks alot for the info....just what I was looking for !!!!!

"Shane Devenshire" wrote:

Hi,

As Dave has implied we use

Cells(1,1) to indicate A1. You do not need to modifiy it with the Range
method.

Sometimes you might choose to do this

Range(Cells(1,1),Cells(2,2)).Select

If there was any reason, and there is none, you could use

Range(Cells(1,1).Address).Select

The active cell is call the ActiveCell and can be used like this

ActiveCell.Offset(1,0).Select

This code moves the cursor down on cell in the same column. Or

ActiveCell.Select

This code collapses the selected range down to the active cell.

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

Cheers,
Shane Devenshire


"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.....

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Letter to Numeric Value Larry Excel Worksheet Functions 4 July 20th 07 12:55 AM
formula converting number to column letter 26 KR Excel Worksheet Functions 5 March 2nd 06 05:29 PM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Links and Linking in Excel 6 October 13th 05 09:09 AM
How to replace column letter in refferences with a function using the old column letter? Dmitry Kopnichev Excel Worksheet Functions 6 October 13th 05 09:09 AM
Converting Letter Grades to Numeric Angelo D Excel Worksheet Functions 6 April 25th 05 07:29 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"