If cell equals "NEW" copy adjacent cells to new worksheet.

rghenderson

New Member
Joined
Mar 15, 2011
Messages
4
Hi,
I'm sure this is a common problem but I cant find a simple solution. It may be that I need to use macros. I havent used macros before so please keep that in mind. I would appreciate any help you can give.

Column D is either "NEW" or blank.
If D is "NEW" I want to copy cells A,B,C from that row to a new worksheet.

This occurs in two worksheet and Ideally "NEW" items from both sheets would be combined in the new worksheet. eg running this process in one sheet after the other would not write over entries but rather add them bellow the previous entries.

Thanks in advance!
Rob
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Hi,

Hope this could help

Code:
Sub Check1()
Range("A2").Select
NumRows = Range(Selection, Selection.End(xlDown)).Rows.Count
Range("D2").Select
For x = 1 To NumRows
ActiveCell.Select
If Selection.Text = "new" Then
Selection.Offset(0, -1).Select
Range(Selection, Selection.End(xlToLeft)).Select
Selection.Copy
Windows("Book2.xls").Activate
Range("A65536").End(xlUp).Select
Selection.Offset(1, 0).Select
ActiveSheet.Paste
Windows("Book1.xls").Activate
ActiveCell.Select
Selection.Offset(1, 3).Select
Else
ActiveCell.Select
Selection.Offset(1, 0).Select
End If
Next

End Sub

This code is pretty RAW.
Could have some refining.
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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