copy cells to another sheet based on cell criteria

slivesay

Board Regular
Joined
Jan 4, 2019
Messages
64
I am trying to move cells between cols A and L to a sheet named BREAK from a sheet name FAB w/ the criteria being met "Single Rollup Frame" in col B and it being a copy/paste that will always paste on the next available row. The code I have works some and doesn't give a debug - but it is only pasting the info from cols A and B. This code is in the FAB worksheet and not in a module. Can someone help me please?

Code:

Private Sub Worksheet_Change(ByVal Target As Range)


If Intersect(Target, Columns("B:B")) Is Nothing Then Exit Sub


If Target.Value = "Single Rollup Frame" Then Range(Cells(Target.Row, "A"), Cells(Target.Row, "L")).Copy _
Sheets("BREAK").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)


End Sub
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Works fine for me....but it does only copy the target row....no others !!
 
Last edited:
Upvote 0
Thank you! I figured it out. There was one line of code in my userform code that was blocking this sheet code from pasting all the cells in the criteria. I am going to close this thread. This code does work!

Respectfully,
slivesay
 
Upvote 0
Ok...no need to close....all good.
Glad you got it sorted out ....:beerchug:
 
Upvote 0

Forum statistics

Threads
1,223,214
Messages
6,170,772
Members
452,353
Latest member
strainu

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