Hi there!
I am trying to write VBA code to execute the following (visual screenshot attached)
If the concatenated store and zip code value (ex: Walmart98101) is repeated in any of the columns (ex: columns C, E and F), I need to ensure the value of row 1 is the same in each instance of the concatenation match. If the row 1 value does not match, I need a message box to display, alerting me of a mismatch (such would be the case with column E, as 2009 <> 2003). The message box is simple, but I have been going back and forth on how the code should look to align to the logic above, but can’t figure it out. It seems like I am making it more difficult than it needs to be. I thought I had something, but then realized I was only comparing to the immediate right column, instead of comparing across all columns. So in my example screenshot, although there are 3 instances of Walmart98101, my code wasn’t able to recognize any of them.
I appreciate any help, guidance or direction in advance!
I am trying to write VBA code to execute the following (visual screenshot attached)
If the concatenated store and zip code value (ex: Walmart98101) is repeated in any of the columns (ex: columns C, E and F), I need to ensure the value of row 1 is the same in each instance of the concatenation match. If the row 1 value does not match, I need a message box to display, alerting me of a mismatch (such would be the case with column E, as 2009 <> 2003). The message box is simple, but I have been going back and forth on how the code should look to align to the logic above, but can’t figure it out. It seems like I am making it more difficult than it needs to be. I thought I had something, but then realized I was only comparing to the immediate right column, instead of comparing across all columns. So in my example screenshot, although there are 3 instances of Walmart98101, my code wasn’t able to recognize any of them.
I appreciate any help, guidance or direction in advance!