Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 694
Default 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
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
Cell References [email protected] Excel Discussion (Misc queries) 2 November 15th 06 11:37 PM
Conditional Format as a MACRO Gunjani Excel Worksheet Functions 3 March 29th 06 05:22 PM
macro help thephoenix12 Excel Discussion (Misc queries) 4 July 15th 05 05:57 PM
Copy cell format to cell on another worksht and update automatical kevinm Excel Worksheet Functions 21 May 19th 05 11:07 AM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 08:50 PM.

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"