Copy Rows in VBA starting in middle of sheet to first empty row: Excel 2013

blueroo123

New Member
Joined
Apr 25, 2015
Messages
6
Hi Everyone:

I have been sorting through a problem, but cannot exactly figure out how to do it..

We need to be able to start a specific cell "F283" and move down through column F until there is a blank cell, and copy that column for use somewhere else. I have seen a couple offerings that are similiar to:

Code:
nrows = Worksheets("Master").Cells(Rows.Count, 4).End(xlUp).Row
    Worksheets("Copy").Rows("2").Copy Worksheets("Copy").Range("A3").Resize(nrows)

But, we need to start at a specific cell, rather than D1. Can someone please help me solve this one?

Thanks in advance!
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Code:
Range("F283:F" & Range("F283").End(xlDown).Row).Copy Range("D1")
This line of code copies from F283 down to a blank cell and pastes it starting in cell D1. Change ranges as needed
 
Upvote 0
Couple of questons..
1. IS it always going to start at cell F283 ??
2. Your title says copy rows, but your message syas column.....which is it ??

Code:
and copy that column for use somewhere else
 
Upvote 0
Hi Momentman -

I tried the code and revised the ranges, and it did not seem to paste into cell D1 -- am I forgetting something?
 
Upvote 0
Michael:

Yes, so I am looking to copy in a column, starting in a specific cell "F283" - which will always be the starting point - and determine the range to copy, based upon the appearance of the first blank cell - and copy that to a specific location, "D1". Does that help?
 
Upvote 0
Momentman - sorry, it worked perfectly and copied the formulas -- how would I modify it to paste values only?
 
Upvote 0
Hi Momentman -

I tried the code and revised the ranges, and it did not seem to paste into cell D1 -- am I forgetting something?

The code did work for me. Confirm you have data in cell f283 and downwards and that the sheet that has the data is the active sheet when the code is run

Code:
Sub CopyFromMiddle()
    Range("F283:F" & Range("F283").End(xlDown).Row).Copy
    Range("D1").PasteSpecial (xlPasteValues)
End Sub
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,201
Messages
6,123,617
Members
449,109
Latest member
Sebas8956

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