Moving rows to a couple of different sheets based on the value

Jimmytheman

New Member
Joined
Jan 10, 2017
Messages
2
Hey Guys,

I have to make a sort of database to make my job a little bit easier and have been struggling with macro's.(I'm a big excel noob) What I would like to make is a macro that scans the column (categorie) for the inserted value (one of the 4) and based on that value moves the entire row to another worksheet.
Sorry for the Language, I need it to work in Dutch.
It won't let me upload an image of the table so I included a dropbox link with a screenshot.
https://www.dropbox.com/s/dirrii65o1rz21l/Screen Shot 2017-01-10 at 14.02.03.png?dl=0

The values are in column G
Categorie/worksheet
Expert->Experts
Champion->Champions
Sleutelfiguur->Sleutelfiguren
Nieuw contact-Nieuwe contacten

I appreciate your help! Thank you so much.




VoornaamAchternaamFaculteit/dienstspecialiteitEmailLaatst gesprokenCategorie
JohnAppleFERExcel.10/10/10Expert

<tbody>
</tbody>
 

Some videos you may like

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Jimmytheman

New Member
Joined
Jan 10, 2017
Messages
2
I'm trying to make this work as a simple start of the code but I'm not sure what im doing.

Sub copyrows()


Dim tfCol As Range, Cell As Object



Set Experts = Sheet1
Set Champions = Sheet2
Set Sleutelfiguren = Sheet3
Set Nieuwecontacten = Sheet4


Set tfCol = Range("'Alle Contacten'!G:G")
For Each Cell In tfCol
If IsEmpty(Cell) Then
Exit Sub


If Cell.Value = “Expert” Then
Cell.EntireRow.Copy
Sheet1.Select
ActiveSheet.Range("A65536").End(xlUp).Select
Selection.Offset(1, 0).Select
ActiveSheet.Paste
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,143
Messages
5,599,975
Members
414,354
Latest member
Flaxarn

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
Top