Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default cell reference using macro


Hi,

I am using Excel 2002 and I want to do a macro that will cell reference
from one worksheet to another. For example I want Sheet 1 cell B10:C17 to
be able to reference from Sheet 2 F10:G17. I don't want to do a copy and
paste, because the user may change the data in Sheet 2. Any tips or
suggestion will be appreciated. Thank you in advance.



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default cell reference using macro

Not too sure what you are trying to do but this will create a range
reference for both ranges.
It really depends what you want to do with the data.

Dim rng1 as range
Dim rng2 as range

With worksheets("Sheet1")
set rng1 = .range("b10:c17")
End with

With worksheets("Sheet2")
set rng2 = .range("F10:G17")
End with




"Alex Martinez" wrote in message
...

Hi,

I am using Excel 2002 and I want to do a macro that will cell reference
from one worksheet to another. For example I want Sheet 1 cell B10:C17 to
be able to reference from Sheet 2 F10:G17. I don't want to do a copy and
paste, because the user may change the data in Sheet 2. Any tips or
suggestion will be appreciated. Thank you in advance.




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default cell reference using macro

Hi Alex,

Try:

Sub Tester()

Sheets("Sheet1").Range("B10:C17").FormulaR1C1 = _
"=Sheet2!RC[4]"
End Sub


---
Regards,
Norman



"Alex Martinez" wrote in message
...

Hi,

I am using Excel 2002 and I want to do a macro that will cell reference
from one worksheet to another. For example I want Sheet 1 cell B10:C17 to
be able to reference from Sheet 2 F10:G17. I don't want to do a copy and
paste, because the user may change the data in Sheet 2. Any tips or
suggestion will be appreciated. Thank you in advance.




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
Macro using a cell reference Jason Falzon[_2_] Excel Discussion (Misc queries) 3 March 24th 10 04:16 PM
Cell Reference Macro Scott Excel Discussion (Misc queries) 3 June 16th 09 04:13 PM
Macro cell reference help justaguyfromky Excel Programming 9 January 8th 05 05:43 PM
Cell Reference in a Macro Tim Excel Programming 1 April 28th 04 06:31 PM
run a macro from a cell reference spence[_3_] Excel Programming 2 December 9th 03 09:36 PM


All times are GMT +1. The time now is 08:53 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"