Search : in
By :

Copy to next blank line

Last answer on Jul 2, 2009 3:16:17 pm BST fmelvin, on Jul 1, 2009 1:48:23 pm BST 
 Report this message to moderators

I'm new to macro - so don't laugh... I'm trying to copy Cells A1 and B1 from 400 worksheets to a single worksheet (Merge). The following macro code copies and pastes the cells but overwrites each time the macro is run.

How can I tell the system to paste in the next blank row?


Sub Macro5()
'
' Macro5 Macro

'
Range("A1:B1").Select
Selection.Copy
Sheets("Merged").Select
Range("A1").Select
ActiveSheet.Paste

End Sub

Configuration: Windows XP Internet Explorer 6.0

Best answers for « Copy to next blank line » in :
[ThunderBird] Opening HTTP links in Firefox Show[ThunderBird] Opening HTTP links in Firefox Intro Thunderbird under Windows Thunderbird under GNU/Linux Notes common to Windows and GNU/Linux Intro Its an annoying procedure, to copy/paste HTTP links from an email to see them...
Sed - inserting spaces ShowSed - inserting spaces Insert a blank line after each sentence (punctuated by a carriage return) sed G file.txt Insert a blank line after each sentence (punctuated by a carriage return), without taking into account the existing white...
Excel – Macro to detect and hide blank rows ShowExcel – Macro to detect and hide blank rows Issue Solution Note Issue I want a macro to unhide about 20 blank rows copy values into the top row then hide the remaining rows (some cells have fill though) then the next time it will...
Download Avira AntiVir Personal free for Linux / FreeBSD / OpenBSD / Solaris ShowFor Linux / FreeBSD / OpenBSD / Solaris Avira AntiVir PersonalEdition Classic is a very good and free antivirus which reliably protects your private computer against dangerous viruses, worms, Trojans, rootkits and costly dialers.
Download Ext2 Installable File System ShowIf you currently have Windows running and you realize that you need some files for your work which you have stored on an Ext2 volume of your Linux installation, you no longer have to shut down Windows and boot Linux! Furthermore, Windows will now...
Linux - The Vi editor ShowIntroduction to Vi Despite its very limited ergonomics, Vi i is one of the most popular text editors texte under Unix type systems (with Emacs and pico). Under Linux, there is a free version of Vi called Vim (Vi Improved). Vi (pronounced vee-eye)...
Linux - The shell ShowIntroduction to the shell The command interpreter is the interface between the user and the operating system, hence the name "shell". The shell therefore acts as an intermediary between the operating system and the user thanks to command lines...
Worksheet - Cells ShowThe Concept of a Cell A "cell" is the intersection between a line (horizontal) and a column (vertical) on a worksheet. Thus, the name of the line combined with the name of the column gives the cell's coordinates (the term address is sometimes also...

1

Excelguru, on Jul 2, 2009 3:56:42 am BST
  • +1

Hi fmelvin

use Range("A401").End(xlup).Select Winners are losers who got up and gave it one more try. -Dennis DeYoung
My Interests are financial Modelling and custom excel development.

Reply to Excelguru

2

 fmelvin, on Jul 2, 2009 3:16:17 pm BST

Awesome Excelguru, I'll give it a try. I'll keep you posted - thanks again.

Reply to fmelvin