Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Excel Copy and Paste from sheet

Posted on 2011-02-12
3
Medium Priority
?
273 Views
Last Modified: 2012-05-11
Hello Experts,

Hope you're all well. Before I ask a question, I just want to say this is the best subscription I've ever paid for.

Anyway, can someone please help me compile a macro/program that will allow me to copy and paste from one sheet to another.

Let me explain, in the attached I have two sheets. In sheet one, column B, I would like to copy and paste the information from sheet 2 column A in one keystroke into sheet one column B.

Now, I know you're probably thinking why don't I just copy and paste it myself! However, if you understood how many times I need to do this you would understand why I'm asking for your help with this.

As always, thank you.

Carlton
copyandpaste.xlsm
0
Comment
Question by:cpatte7372
3 Comments
 
LVL 3

Expert Comment

by:andreibutu
ID: 34878636
Hello,

You could simply insert a formula in colum b sheet 1, like this:
in cell 2:
='sheet 2'!A2

and this will automatically put your data from sheet 2 column A in sheet 1 column B.
And you can drag the function for the entire column.
Hope this helps you
0
 
LVL 30

Accepted Solution

by:
SiddharthRout earned 2000 total points
ID: 34878643
Try this

Sub Sample()
    Dim lastrow As Long
    
    lastrow = Sheets("Sheet 2").Range("A" & Rows.Count).End(xlUp).Row
    
    Sheets("sheet 2").Range("A2:A" & lastrow).Copy _
    Sheets("sheet1").Range("B2")
End Sub

Open in new window


Sid
0
 

Author Closing Comment

by:cpatte7372
ID: 34878719
Brilliant mate.....
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question