Can i do three

sueandco

New Member
Joined
Oct 19, 2002
Messages
31
Hi Id like to paste in three cells instead of just one into succeeding rows, ie N29 into Q8, N30 into Q9 ,N31 int Q10 with this at the PASTECELL Range= ("N29,N30,N31
If Range("K29") = Range("H6") Then
MsgBox ("Do yo want to do landing and under stairs")
PASTECELL = Range("N29")

DATA = Range("Q6:Q100")
CROW = 6

For Each LDATA In DATA

If PASTECELL = "" Then Exit Sub

If PASTECELL <> "" And Range("Q" & CROW) = "" Then
Range("Q" & CROW) = PASTECELL
Exit Sub
End If

If PASTECELL <> "" And Range("Q" & CROW) <> "" Then CROW = CROW + 1

Next LDATA
Thanks
Sue
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Sue you need to amend the code as follows:

PASTECELL= Range("N29:N31")

should work fine - the basic test will still be N29 to Q8 or whatever it was...so as long as Q is blank it will simply copy in three rows into the first blank Q row and the 2 after - eg say Q8 blank - Q8 = N29, Q9 = N30 etc
 
Upvote 0

Forum statistics

Threads
1,215,062
Messages
6,122,923
Members
449,094
Latest member
teemeren

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