On sheet 1 I have 4 cols and the 5th col contains 2 values ("Name of the resource" and "TBC").
So what I want is > I need these 4 cols(from sheet1) to be replicated in sheet 2 BUT only based on "TBC".
Hence if out of 50 rows in sheet 1 If I have 10 TBC, then in SHEET 2 I want to see just these 10 values.
Makes sense ?
Tried this VBA but cannot make it work..
Private Sub CommandButton1_Click()
LastRow = Sheets("Sheet1").Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("TBC" & i).Value = 1 Then
LastRow2 = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
Sheets("Sheet2").Range("A" & LastRow2).Value = Sheets("Sheet1").Range("A" & i)
End If
Next i
Sheets("Sheet2").Range("A1").Delete Shift:=xlUp
End Sub
So what I want is > I need these 4 cols(from sheet1) to be replicated in sheet 2 BUT only based on "TBC".
Hence if out of 50 rows in sheet 1 If I have 10 TBC, then in SHEET 2 I want to see just these 10 values.
Makes sense ?
Tried this VBA but cannot make it work..
Private Sub CommandButton1_Click()
LastRow = Sheets("Sheet1").Range("A65536").End(xlUp).Row
For i = 1 To LastRow
If Range("TBC" & i).Value = 1 Then
LastRow2 = Sheets("Sheet2").Range("A65536").End(xlUp).Row + 1
Sheets("Sheet2").Range("A" & LastRow2).Value = Sheets("Sheet1").Range("A" & i)
End If
Next i
Sheets("Sheet2").Range("A1").Delete Shift:=xlUp
End Sub