Autopopulating multiple sheets from one main sheet [Closed]


I'm making an quote workbook for an organization and I've run into a problem.

On the first sheet "Main sheet" I input all of the transactions. What I would like to do, is have each individual vendor sheet automatically populate with data when it's inputted onto the main "Main sheet" sheet, and have it based on the Vendor column in the table. So basically, if the Vendor says "Arvee Enterprises", I would like for the entire row to be transferred to the sheet "Arvee Enterprises". And so on for each individual sector.

I have written a code but it is giving error to me.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

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

If Target.Value = "Arvee Enterprises" Then
Range(Range("A" & Target.Row), Range("B" & Target.Row)).Copy _
Sheets("Arvee Enterprises").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)

ElseIf Target.Value = "Solution A to Z" Then
Range(Range("A" & Target.Row), Range("B" & Target.Row)).Copy _
Sheets("Solution A to Z").Range("A" & Rows.Count).End(xlUp).Offset(1, 0)

End If

End Sub

Any tips or suggestions?

I greatly appreciate any and all help!

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!