Hello,
Is it possible to write a simple macro that will cut data & paste it? For example, when I run this macro it
cuts the data from cells A1:A3 and pastes it in cells D1:D3?
Hello,
Is it possible to write a simple macro that will cut data & paste it? For example, when I run this macro it
cuts the data from cells A1:A3 and pastes it in cells D1:D3?
Last edited by Rick-O-Shay; 12-30-2009 at 01:36 PM.
Hi Rick-O-Shay,
welcome to the forum.
Have you tried using the macro recorder to do the copy and paste? That's a good starting point to create macros that you can edit and change to your needs, if you want to learn about VBA.
You can try out the differences with relative and absolute referencing and try and define source cells and target cells for the copy and paste operation after studying the code.
Once you have a base example, you could come back here for advice on fine-tuning.
hth
Well, I'm not too good with VBA and Macros, but what I am doing is I have a spreadsheet where data is entered in cells A1:A3 and I have a button (which I need a Macro for) where when pressed it will take that data and put it in cells D1:D3 and hopefully, (if this is even possible) each time data is entered in cells A1:A3 and the button is pressed, data will trickel down a line. So next time I press the button the data is placed on E1:E3 etc....
Is this possible? If so, can anyone give me a basic script to do this? One I have my basic script I am learning my way around by looking at what others do.
OK,
start the macro recorder, do your copy and paste thing and stop the macro recorder.
Then post the generated code here and ask how this code can be modified to paste in the next available empty row.
I'm sure you will get answers (not from me, though, I'm afraidI'm still learning this stuff myself!)
cheers
Here's what Teylyn means,
Try to understand the recorded macro. Then rework it to a more efficient code. VBA recorder in XL is not that good. It was much better in Lotus 123 (so I heard)
and reworked:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
Last edited by rwgrietveld; 12-30-2009 at 03:17 AM.
Looking for great solutions but hate waiting?
Seach this Forum through Google
www.Google.com (e.g. +multiple +IF site:excelforum.com/excel-general/ )
www.Google.com (e.g. +fill +combobox site:excelforum.com/excel-programming/ )
Ave,
Ricardo
Ok here is my base code
Ok, Here is my problem. I need to make this code so that each time it is run the data is dropped down a line. For example, it is run this time and pasted in A8:C8, next time it pastes the data in cells A9:C9... how do I do this?![]()
Please Login or Register to view this content.
Last edited by Rick-O-Shay; 12-30-2009 at 01:33 PM.
I guess I should say, is this even possible? Does it make sense?
I need to keep a log of information and I don't want it to write on top of my current data. This macro would allow me to continue to place what is put in cells A1:C1 down the excel spreadsheet.
So if I understand correctly:
A1:C1 has the data.
This data needs to be put under the last recorded log?
What can be done is find out where the last enty is. This is done frequently with the code.Putting this together with your current code:![]()
Please Login or Register to view this content.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks