Transferring Data

Irfaan Kahan

New Member
Joined
Mar 29, 2011
Messages
4
Hello All

I'm a VBA amateur, but am familiar with the (very) basics. Currently, I'm trying to copy a data range (table values) from one workbook to another. The problems I'm having are as follows:
1. I need to copy only the non - blank cells within a given range I specify.
2. I need to then paste these values into an identical table in another workbook. However, I must begin the paste procedure at the first blank row in the second workbook.

I've been googling for a few hours now with no luck (close - but no cigar) - and being a noob the excel help file is a little over my head.

I don't have a problem opening workbooks or copying and pasting in general using vb, but this specific problem has me in a bit of bother.

Thank you in advance
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Thank you

I had a look, but the topics with titles that seemed relevant didn't help me much - perhaps I missed it.

Here's what I've done so far, but no luck:

Code:
'Copy non blank cells in range:
ActiveWorkbook Range("A1:l34").End(xlDown).Row.Copy
Application.ScreenUpdating = False
Application.DisplayAlerts = False
'Paste values into first blank row:
            Workbooks.Open ("C:\Users\KahanI\Desktop\Sales Tool\DO STUFF\MASTER CONTROL.xlsx")
            Sheets("2011_Summary").Select
                Range("A1").Select
                Selection.End(xlDown).Select
                ActiveCell.Offset(1, 0).Select
                Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                :=False, Transpose:=False
            
            'Workbooks("MASTER CONTROL.xlsx").Save
            'Workbooks("MASTER CONTROL.xlsx").Close
Application.DisplayAlerts = True
Application.ScreenUpdating = True
 
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,245
Members
452,900
Latest member
LisaGo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top