hello everyone
since I'm new to vba, I have small problem, I want a macro that checks 2 cells (in 2 different sheets) if they are the same delete the row of the 1st cell.
also a macro if a column has "yes" then copy it , the problem when adding a new row with yes the macro copy every row from the top , but i want to add just the new row
this my code for the second macro
since I'm new to vba, I have small problem, I want a macro that checks 2 cells (in 2 different sheets) if they are the same delete the row of the 1st cell.
also a macro if a column has "yes" then copy it , the problem when adding a new row with yes the macro copy every row from the top , but i want to add just the new row
this my code for the second macro
VBA Code:
Dim wk As Workbook
'Dim ws_panne As Worksheet
'Dim ws_analyse As Worksheet
Dim lstrw_histopanne, lstrw_histoanalyse As Long
Dim ligne_coller As Long
Set wk_fichier = ActiveWorkbook
Set ws_panne = wk.Sheets("Sheet2")
Set ws_analyse = wk.Sheets("sheet3")
lstrw_histopanne = .Cells(Rows.Count, 1).End(xlUp).Row
For i = 7 To lstrw_histopanne
If ws_panne.Cells(i, 8) = "YES" Then
lstrw_histoanalyse = ws_analyse.Cells(Rows.Count, 1).End(xlUp).Row
row_paste = lstrw_histoanalyse + 1
'paste
ws_analyse.Cells(row_paste, 1) = ws_panne.Cells(i, 5)
End If