Macro to Copy Paste Value to next blank row

luke1438

Board Regular
Joined
Nov 1, 2004
Messages
156
I am trying to copy from sheet 1 the range C5:I5
and
paste Value it in the next available row column "B" in sheet 2

Any suggestions on how I can do this?

Thanks
Luke
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Would this code do it?

I'm unsure just where you want it pasted, but easily modified as need be.
Code:
Sub copypaste()
Dim lrb As Long
With Sheets("Sheet2")
    lrb = .Range("B" & Rows.Count).End(3).Row
Sheets("sheet1").Range("C5:I5").Copy .Range("C" & lrb + 1)
End With
End Sub
 
Upvote 0
Code:
Sub Macro1()
    Sheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Offset(1).Resize(, 7).Value = _
        Sheets("Sheet1").Range("C5:I5").Value
End Sub
 
Upvote 0
Actually, I see now you just wanted the values pasted.

My code transferred the whole range (incl. formatting etc) which was more than needed.

A clear violation of William of Ockham's "razor" principle that "it's vain to do with more what can be done with fewer" etc.

Guess I'd just better read the post better next time.
 
Upvote 0

Forum statistics

Threads
1,224,524
Messages
6,179,310
Members
452,906
Latest member
phanmemchatdakenhupviral

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