ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Possible syntax error (https://www.excelbanter.com/excel-programming/362511-possible-syntax-error.html)

Worldman1

Possible syntax error
 
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.


ward376

Possible syntax error
 
Try -

Range("b1") = Range("e4").Value


Nigel

Possible syntax error
 
Because syntactically it is wrong!.

Try using......

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


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.




Norman Jones

Possible syntax error
 
Hi Ron,

Having re-read, your original thread, try changing the contents of cell B1
from

"E:14"


to a valid cell reference, e.g.:

E14

Subject to a valid cell reference in the cell of interest, I had no problem
with my suggested code.


---
Regards,
Norman



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.




Ardus Petus

Possible syntax error
 
Does B1 contain a valid cell reference? (like C12)

--
AP

"Worldman1" a écrit dans le message de news:
...
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.




Worldman1

Possible syntax error
 
Thanks Nigel, but I need to explain that cell B1 contains a reference
to another cell which is to be the destination of the value in E4. The
purpose is not to copy E4 to B1

If you know how then pls tell me - thanks again , , ,

Cheers,
RonW.


Norman Jones

Possible syntax error
 
Hi Nigel,

Because syntactically it is wrong!.


Are you sure?!

See Ron's original thread and my response to Ron in this thread.

http://tinyurl.com/qvsej


---
Regards,
Norman



"Nigel" wrote in message
...
Because syntactically it is wrong!.

Try using......

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


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.






Worldman1

Possible syntax error
 
AP, you got it in one - I goofed

I had E:21 in B1, of course it should have been E21

Thanks to everyone for your kind assistance :-)

Cheers,
RonW.


Nigel

Possible syntax error
 
Sorry, I read this literally as a value copy not a reference copy!

--
Cheers
Nigel



"Norman Jones" wrote in message
...
Hi Nigel,

Because syntactically it is wrong!.


Are you sure?!

See Ron's original thread and my response to Ron in this thread.

http://tinyurl.com/qvsej


---
Regards,
Norman



"Nigel" wrote in message
...
Because syntactically it is wrong!.

Try using......

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


--
Cheers
Nigel



"Worldman1" wrote in message
oups.com...
Can anyone suggest a reason why the following fails?

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

Thanks,

RonW.









All times are GMT +1. The time now is 01:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com