This is my first ever VBA code, so I apologize in advance if the error I am getting it's because I am beginner.
Lemme try to explain what I want, and then I'll post the VBA code I've made.
I am building an Excel Roster management for my WOW guild. In the first spreadsheet I write the main information about the players, the second spreadsheet is all about players alternative characters, third sheet is a warning system and the fourth sheet is a specific group of people. What I want is, if in the first spreadsheet a player is set as a player for "Eclipse" group, his name goes directly to the fourth sheet.
First spreadsheet, where you can see the "Eclipse" (red arrow) under the Raid Team, that should be the "if" thing. If it has "Eclipse", then the name of the player (blue arrow) is automatically inserted into a specific spreadsheet
See [Troubleshoot1] image.
And this is the fourth spreadsheet, where I want the information to be inserted.
See [Troubleshoot2] image.
The code I'm using is:
Sub EclipseRaidTeamMacro() Dim StatusCol As Range Dim Status As Range Dim PasteCell As Range Set StatusCol = Planilha2.Range("D2:D75") For Each Status In StatusCol If Planilha4.Range("A2") = "" Then Set PasteCell = Planilha4.Range("A2") Else Set PasteCell = Sheet4.Range("A1").End(xlDown).Offset(1, 0) End If If Status = "Eclipse" Then PastelCell.Resize(1, 14).Value = Status.Offset(0, -14).Resize(1, 14).Value Next Status End Sub
Bare in mind that my Excel is set to portuguese, so whenever you read "Planilha" it means "Spreadsheet"
Thank you all in advance!