The purpose of the macro, is to fix the data where it is invalid.
I need to have macro to evaluate a few terms, fix if needed and add a comment of the fix.
My logic how to check it goes as follows, Im just not able to write it into VBA.
1.) Marcro runs and checks D column (we could use table name instead of D:D?) for "Z5" value.
2)If Z5 value is found, it checks, whether the partner sub unit value is the same as sellers
a)If partner subunit name is the same, it performs the check for PG, if these match as well, macro continues down to find another row with Z5
b)if partner subunit name is something different, macro owerwrites the current value with the name taken from seller sub unit and checks PG for match as well if same correction needs to be done.
3)If either partner subunit name AND/OR PG needs to be altered, macro writes comment, example written in the image, but it could contain what was changed as well...
I believe maximum amount of rows macro needs to check is max 100 000, so quite a lot....
thank you for ideas!
I need to have macro to evaluate a few terms, fix if needed and add a comment of the fix.
My logic how to check it goes as follows, Im just not able to write it into VBA.
1.) Marcro runs and checks D column (we could use table name instead of D:D?) for "Z5" value.
2)If Z5 value is found, it checks, whether the partner sub unit value is the same as sellers
a)If partner subunit name is the same, it performs the check for PG, if these match as well, macro continues down to find another row with Z5
b)if partner subunit name is something different, macro owerwrites the current value with the name taken from seller sub unit and checks PG for match as well if same correction needs to be done.
3)If either partner subunit name AND/OR PG needs to be altered, macro writes comment, example written in the image, but it could contain what was changed as well...
I believe maximum amount of rows macro needs to check is max 100 000, so quite a lot....
thank you for ideas!