I am not very familiar with VBA and I need help with programming a code to do the following:
On Button Click in Sheet 1
- Copy values from Column A if value =1 to worksheet 2 into column A.
- If the value = 2 then copy it to worksheet 3 into column A.
This is my current code.
Sub Mandat1_Click()
For Each Cell In Range("A2:A81")
If Cell.Value = 1 Then
Sheets(3).Range("C2:C81").Value = Sheets(1).Range("A2:A81").Value
End If
Next Cell
End Sub