Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
sparx
 
Posts: n/a
Default Copy & Paste macro


Please can anybody help - I have 2 database's in excel. At present I
copy a range of cells in database 2 and in database 1 find the next
empty "column A" row and then paste ( values only ) the data. Is there
a macro that could do this for me so it looks down "column A" and finds
the next empty row cell then copies the data into it - there is a catch
though - it must copy as values not a straight forward copy.


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=466723

  #2   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

do you want it in vba programme
assume all filled rows contains some value in column A
then use something like this
Public Sub test()
Range ("F1:F5"), Copy
Range("a1").End(xlDown).Offset(1, 0).PasteSpecial xlPasteValues
End Sub


"sparx" wrote in
message ...

Please can anybody help - I have 2 database's in excel. At present I
copy a range of cells in database 2 and in database 1 find the next
empty "column A" row and then paste ( values only ) the data. Is there
a macro that could do this for me so it looks down "column A" and finds
the next empty row cell then copies the data into it - there is a catch
though - it must copy as values not a straight forward copy.


--
sparx
------------------------------------------------------------------------
sparx's Profile:

http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=466723



  #3   Report Post  
sparx
 
Posts: n/a
Default


Yes - I want to be able to highlight a certain cell in database 2 that
will say - press here to auto copy to database 1 then when you press it
- it highlights an area of data in database 2 and then looks down the
column A in database 1 until it finds the next empty row then paste's (
special ) the values then returns to the database 2.


--
sparx
------------------------------------------------------------------------
sparx's Profile: http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=466723

  #4   Report Post  
R.VENKATARAMAN
 
Posts: n/a
Default

save the two workbooks and open both of them
the data are in sheet1 of the two books in column A1 on
you want to copy data in column A of sheet1 of book2 to shee1 of book1 at
the botttom of the data in col A.

then
in book2 goto sheet1 open control toolbox click <commanbutton and create it
somewhere in the sheet 1.
right clik this command button and click view code
you will get some thing like this
Private Sub CommandButton1_Click()

End Sub

above < end sub copy the following code

===========
Dim copydata As Range
Dim tocopy As Range
Windows("book3.xls").Activate
Set copydata = Worksheets("sheet1").Range("a1:a6")
Windows("book2.xls").Activate
Set tocopy = Worksheets("sheet1").Range("a1").End(xlDown).Offse t(1, 0)
copydata.Copy Destination:=tocopy
=========
click design icon to remove design mode

now if you click the command button hope you will get what you want.
if any bug let me know
--
remove $$$ from email addresss to send email
____________________________________________
"sparx" wrote in
message ...

Yes - I want to be able to highlight a certain cell in database 2 that
will say - press here to auto copy to database 1 then when you press it
- it highlights an area of data in database 2 and then looks down the
column A in database 1 until it finds the next empty row then paste's (
special ) the values then returns to the database 2.


--
sparx
------------------------------------------------------------------------
sparx's Profile:

http://www.excelforum.com/member.php...o&userid=16787
View this thread: http://www.excelforum.com/showthread...hreadid=466723



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 to copy and edit then delete a worksheet lschuh Excel Discussion (Misc queries) 13 July 27th 05 09:02 PM
Copy Paste macro GWB Direct Excel Discussion (Misc queries) 2 May 9th 05 03:31 PM
Can't Copy and Paste between Excel 2003 Workbooks wllee Excel Discussion (Misc queries) 6 March 30th 05 02:59 PM
Macro - Copy - Email John Excel Worksheet Functions 1 March 2nd 05 08:36 PM
copy / paste selective rows Kenny Kendrena via OfficeKB.com Excel Discussion (Misc queries) 5 February 7th 05 01:55 PM


All times are GMT +1. The time now is 12:28 PM.

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"