Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Converting Letter to Numeric Value | Excel Worksheet Functions | |||
formula converting number to column letter 26 | Excel Worksheet Functions | |||
How to replace column letter in refferences with a function using the old column letter? | Links and Linking in Excel | |||
How to replace column letter in refferences with a function using the old column letter? | Excel Worksheet Functions | |||
Converting Letter Grades to Numeric | Excel Worksheet Functions |