Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default copy cell to reference contained in another cell

another procedure I'm struggling with -

Cell B1 contains a variable cell reference, for example "E:14"
I want to copy contents of cell $E$4 to the cell reference pointed to
in the above

Can't make it work - help would be appreciated . . .

(does anyone know where can I find a comprehensive syntax guide?)

Probably my last question - for now at least . .

Thanks in advance . . .

RonW.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default copy cell to reference contained in another cell

Hi Worlman1,

Try:

Range("E4").Copy Destination:=Range(Range("B1").Value)


---
Regards,
Norman



"Worldman1" wrote in message
ps.com...
another procedure I'm struggling with -

Cell B1 contains a variable cell reference, for example "E:14"
I want to copy contents of cell $E$4 to the cell reference pointed to
in the above

Can't make it work - help would be appreciated . . .

(does anyone know where can I find a comprehensive syntax guide?)

Probably my last question - for now at least . .

Thanks in advance . . .

RonW.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default copy cell to reference contained in another cell

Hi Norman,

Thanks, but there apears to be a syntax error . .

Cheers,
RonW.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default copy cell to reference contained in another cell

Hi Worldman1,

Thanks, but there apears to be a syntax error . .


I do not think so - it works for me.

However, try the following fully qualified version:

'=============
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet

Set WB = Workbooks("YourBook.xls") '<<==== CHANGE
Set SH = WB.Sheets("Sheet1") '<<==== CHANGE

With SH
.Range("E4").Copy Destination:=.Range(.Range("B1").Value)
End With

End Sub
'<<=============


---
Regards,
Norman



"Worldman1" wrote in message
oups.com...
Hi Norman,

Thanks, but there apears to be a syntax error . .

Cheers,
RonW.



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
HOW DO COPY A CELL BUT INCREASE ITS REFERENCE BY TWO CELL POSITIO. Crusty Excel Discussion (Misc queries) 1 May 29th 07 05:59 PM
Characters contained in a cell DHallgren Excel Discussion (Misc queries) 3 March 14th 07 03:46 PM
how to include a cell reference that is contained in a cell withi. dutchinny Excel Worksheet Functions 5 October 24th 05 01:07 AM
copying the function contained within a cell to anouther cell. DMB Excel Worksheet Functions 2 September 1st 05 05:49 PM
Function to determine if any cell in a range is contained in a given cell [email protected] Excel Worksheet Functions 3 February 7th 05 04:19 PM


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