Hi,
Im very new to VBA. I can make some easy changes to example VBA codes I found here on the forum which is a great resource, but am having a problem to find something for me to use (perhaps due to my still learning status) for the following problem:
What I'm trying to do is:
I have 4 columns, let's say A, B, E, and G
Column A can have two text values, let's say 'ItemA' or 'ItemB'.
Column B has multiple different text values (text1, text2, text3 etc. many different options)
Column E and G both have either 'Yes' or 'No' text.
I need to compare rows that have ItemA with rows that have ItemB in that:
I want to check for each row that has ItemA where column E and G are both set to "No", if there is a row with ItemB where column E and G are also both set to 'No' and that has the same text in column B as for the row with ItemA. If there is no match, I want to highlight the row with ItemA that was checked in green. I want to do this for all variations of text in column B.
Vice versa, I want to check for each row that has ItemB+text1+No+No if there is any row with Item A+same text1,No,No, and highlight rows with ItemB+text1+No+No if no match.
I figure I may need some kind of nested loop? (for where column value E = 'no' and column value G = 'no', per each row with Item A, check if a row with ItemB + No + No has same value as the Item A Row). Or am I overcomplicating?
P.s.
- my worksheet has ~30000 rows of data. There are no empty cells or in the 4 columns I mentioned. there are no empty rows.
- rows are not unique with respect to the 4 columns, so there can be duplicate rows (that need to remain).
I have attached an example workbook in case it helps to explain what I would like.
I hope I made sense and would appreciate if someone can point me in the right direction of how to set-up the VBA code or perhaps point me to a thread I should use.
Thank you very much in advance!
Bookmarks