Hi everyone. I currently have an excel sheet that contains rows with very similar data.
I would like to delete the rows if they contain the same first name, last name, DOB and category AND if columns x, y or z does not contain data.
otherwise I want to keep the row.
My knowledge is very weak when it comes to VBA and would appreciate some help. Below is my pseudo code and an example pic of the worksheet.
savedRow = row 2;
while savedRow is less than rows with data {
starting from savedRow+1, loop for n rows as long as they contain data {
IF columns B,C,D and M have matching data to savedRow {
IF columns X,Y or Z contains data {
proceed to next row;
}
ELSE {
delete current row;
proceed to next row;
}
}
ELSE { // if b,c,d,m does not match
proceed to next row;
}
} //end of inner loop
savedRow = savedRow + 1;
} //end of outer while loop
I would like to delete the rows if they contain the same first name, last name, DOB and category AND if columns x, y or z does not contain data.
otherwise I want to keep the row.
My knowledge is very weak when it comes to VBA and would appreciate some help. Below is my pseudo code and an example pic of the worksheet.
savedRow = row 2;
while savedRow is less than rows with data {
starting from savedRow+1, loop for n rows as long as they contain data {
IF columns B,C,D and M have matching data to savedRow {
IF columns X,Y or Z contains data {
proceed to next row;
}
ELSE {
delete current row;
proceed to next row;
}
}
ELSE { // if b,c,d,m does not match
proceed to next row;
}
} //end of inner loop
savedRow = savedRow + 1;
} //end of outer while loop