I need to check if there is in specific column (column C) values other than wanted, like if there is any employees that are not on our´s company payment list.
If there is no employees that are not on our´s company payment list msg box should return some message like "It is OK, would you like to proceed with macro?", and Cancel, OK and
in case that there is employees that are not on our´s company payment list msg box should names of employees with info about sum of their payments (values of payments are in column D).
In the case there is some sum in column D with criterias named above different than 0, msg box should return warnings to "Modify table" and in case that sum in column D with criterias named above equal 0, msg box should return question "Would you like to delete these rows?".
List of employees should be part of code, like array if it is possible.
I have been searching web forums about similar situation, but there is no complete solution.
For now I only manage to figure out how to delete rows if there is some specific values. It is below, but I think I am stuck and having trouble to figure out efficient solution for this
any idea, tips, solutions - thanks in advance
If there is no employees that are not on our´s company payment list msg box should return some message like "It is OK, would you like to proceed with macro?", and Cancel, OK and
in case that there is employees that are not on our´s company payment list msg box should names of employees with info about sum of their payments (values of payments are in column D).
In the case there is some sum in column D with criterias named above different than 0, msg box should return warnings to "Modify table" and in case that sum in column D with criterias named above equal 0, msg box should return question "Would you like to delete these rows?".
List of employees should be part of code, like array if it is possible.
I have been searching web forums about similar situation, but there is no complete solution.
For now I only manage to figure out how to delete rows if there is some specific values. It is below, but I think I am stuck and having trouble to figure out efficient solution for this
any idea, tips, solutions - thanks in advance
Code:
Public Sub Delete_row_X()</SPAN>
Dim Last_Row As Long</SPAN>
Dim iLoop As Long</SPAN>
Last_Row = ActiveSheet.Range("A100000").End(xlUp).Row + 1</SPAN>
For iLoop = Last_Row To 1 Step -1</SPAN>
If (Trim(ActiveSheet.Cells(iLoop, 3).Value) = "James") And (Trim(ActiveSheet.Cells(iLoop, 14).Value) = "0") Then</SPAN>
ActiveSheet.Cells(iLoop, 14).EntireRow.Delete</SPAN>
End If</SPAN>
Next iLoop</SPAN>
End Sub</SPAN>
Public Sub Delete_row_Huan()</SPAN>
Dim Last_Row As Long</SPAN>
Dim iLoop As Long</SPAN>
Last_Row = ActiveSheet.Range("A100000").End(xlUp).Row + 1</SPAN>
For iLoop = Last_Row To 1 Step -1</SPAN>
If (Trim(ActiveSheet.Cells(iLoop, 3).Value) = "Huan") And (Trim(ActiveSheet.Cells(iLoop, 14).Value) = "0") Then</SPAN>
ActiveSheet.Cells(iLoop, 14).EntireRow.Delete</SPAN>
End If</SPAN>
Next iLoop</SPAN>
End Sub</SPAN>