ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Error in formula !! and I can't see why (https://www.excelbanter.com/excel-discussion-misc-queries/83891-error-formula-i-cant-see-why.html)

micmacuk

Error in formula !! and I can't see why
 

Hello,

Could someone tells me why the 1st line works and not the 2nd. I
thought it was the same.
Never the lest to say that I need to use the second format.

Sheets("WeekData").Range("U500:AG540").Copy Destination:=ActiveCell

Sheets("WeekData").Range(Cells(500, 20), Cells(540, 32)).Copy
Destination:=ActiveCell

Any Idea ?

Cheers
Francois


--
micmacuk
------------------------------------------------------------------------
micmacuk's Profile: http://www.excelforum.com/member.php...o&userid=33253
View this thread: http://www.excelforum.com/showthread...hreadid=533999


John James

Error in formula !! and I can't see why
 

U is the 21st column and AG is the 33rd column


--
John James
------------------------------------------------------------------------
John James's Profile: http://www.excelforum.com/member.php...o&userid=32690
View this thread: http://www.excelforum.com/showthread...hreadid=533999


micmacuk

Error in formula !! and I can't see why
 

Thanks for your message James,

sorry I didn't check exactly the this but is was as an example only.
The problem I have is that VBA bugs on the second formula


--
micmacuk
------------------------------------------------------------------------
micmacuk's Profile: http://www.excelforum.com/member.php...o&userid=33253
View this thread: http://www.excelforum.com/showthread...hreadid=533999


micmacuk

Error in formula !! and I can't see why
 

I have found the solution....

Sheets("WeekData").Range(Sheets("WeekData").Cells( 500, 20),
Sheets("WeekData").Cells(540, 32)).Copy Destination:=ActiveCell


--
micmacuk
------------------------------------------------------------------------
micmacuk's Profile: http://www.excelforum.com/member.php...o&userid=33253
View this thread: http://www.excelforum.com/showthread...hreadid=533999



All times are GMT +1. The time now is 11:41 PM.

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