Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Locating a cell within a macro
I have a lookup which gives me a cell ref in terms of R1C1 into cell A2
On the same sheet I have a value that I want to copy from Cell B2 into the cell referenced to in A2. I have a very basic knowledge of macros and not sure if this is possible. Can anyone help? thanks, Ron. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Locating a cell within a macro
Ron,
The macro is as below. The tricky bit is to conver the R1C1 style reference to A1 style: Sub IndirectCopy() Const cCellValue As String = "B2" Const cCellIndirect As String = "A1" Dim sCell As String sCell = Application.ConvertFormula(Range(cCellIndirect), _ xlR1C1, xlA1) Range(sCell).Value = Range(cCellValue).Value End Sub -- Hope this helps Martin Fishlock Please do not forget to rate this reply. "Ron (Bismark)" wrote: I have a lookup which gives me a cell ref in terms of R1C1 into cell A2 On the same sheet I have a value that I want to copy from Cell B2 into the cell referenced to in A2. I have a very basic knowledge of macros and not sure if this is possible. Can anyone help? thanks, Ron. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Cell References | Excel Discussion (Misc queries) | |||
Conditional Format as a MACRO | Excel Worksheet Functions | |||
macro help | Excel Discussion (Misc queries) | |||
Copy cell format to cell on another worksht and update automatical | Excel Worksheet Functions | |||
GET.CELL | Excel Worksheet Functions |