ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   visual basic (copy and paste) (https://www.excelbanter.com/excel-worksheet-functions/92775-visual-basic-copy-paste.html)

ian123

visual basic (copy and paste)
 
i need to copy and paste addresses from on sheet to another depending on the
cell value
EXAMPLE:

IF cell a2 on sheet 1 says "1" then copy the address (cells a1 to a5 on sheet
1) to cells d1 to d5 on sheet 2

if cell A2 on sheet 1 says "54" then copy THAT address (cells a1 to a5 on
sheet 1) to cells d10 to d15 on sheet 2
ANYONES HELP WOULD BE VERY APPRECIATED thanks

Don Guillett

visual basic (copy and paste)
 
Please post in only ONE group so as to not waste the time and effort of
those of us who may reply.

--
Don Guillett
SalesAid Software

"ian123" wrote in message
...
i need to copy and paste addresses from on sheet to another depending on
the
cell value
EXAMPLE:

IF cell a2 on sheet 1 says "1" then copy the address (cells a1 to a5 on
sheet
1) to cells d1 to d5 on sheet 2

if cell A2 on sheet 1 says "54" then copy THAT address (cells a1 to a5 on
sheet 1) to cells d10 to d15 on sheet 2
ANYONES HELP WOULD BE VERY APPRECIATED thanks




Bearacade

visual basic (copy and paste)
 

Is it just me or is your value doesn't make any sense?

if value is 1, paste Sheet1(A1:A5) to Sheet2(D1:D5)
if value is 54, Past Sheet1(A1:A5) to Sheet2(D10:D15)

How does 1 relate to D1:D5 and 54 relate to D10:D15?

and A1:A5 is a range of 5 cells, D10:D15 is a range of 6 cells...


--
Bearacade


------------------------------------------------------------------------
Bearacade's Profile: http://www.excelforum.com/member.php...o&userid=35016
View this thread: http://www.excelforum.com/showthread...hreadid=549722



All times are GMT +1. The time now is 09:18 PM.

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