Macro to copy and paste indivicual rows

davidp13

New Member
Joined
Jun 7, 2011
Messages
25
Hi,

I hope there is someone clever out there that can help me or point me to the right discussio.

Im trying to copy data (my data source) from one worksheet to my main worksheet where all my conditional formatting happens.

I have to copy and paste each line individually, because the conditional formatting does not for some reason allow me to copy and past a range of values.

Sheet: DataSource
I have data in A1:G1000
This data needs to be copied to Sheet:DayReporting

Sheet: DayReporting
The first open cell is A5.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Perhaps like this

Code:
Sub test()
Dim i As Long
With Sheets("DataSource")
    For i = 1 To 1000
        .Range("A" & i).Resize(, 7).Copy Destination:=Sheets("DayReporting").Range("A" & i + 4)
    Next i
End With
End Sub
 
Upvote 0
Welcome to MrExcel.

In what way doesn't your conditional formatting allow you to copy and paste the entire range?
 
Upvote 0
When I copy the entire range from Sheet: DataSource to Sheet: DayReporting it only paste the first line and stop on the next line as soon as it reaches the cell that the conditional formatting is checking.

Im checking to see if the cell is Bold or Not Bold using isBold.
 
Upvote 0
Perhaps like this

Code:
Sub test()
Dim i As Long
With Sheets("DataSource")
    For i = 1 To 1000
        .Range("A" & i).Resize(, 7).Copy Destination:=Sheets("DayReporting").Range("A" & i + 4)
    Next i
End With
End Sub
Hi VoG,

The code only copies one line. Any reason why that would happend?
 
Upvote 0
Sorry, I don't understand what's causing it to stop after the first line. What do you mean by "the field that's being checked for the Bold condition"?
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,283
Members
452,902
Latest member
Knuddeluff

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