FrenchCelt
Board Regular
- Joined
- May 22, 2018
- Messages
- 190
- Office Version
-
- 365
- Platform
-
- Windows
Hello,
I'm in the middle of coding a new macro and as one of my last steps, I want to compare the values of two cells and then take one of three steps depending on the outcome.
As part of the process, I have done a Conditional Formatting (font color used in the conditional formatting -16383844 and fill color 13551615) to look for duplicates in Columns B and O. I then do a COUNTA for both columns and display the results for Column B in S2 and Column O in T2. Ideally, both columns would have an identical number of cells with values. If not, I need to figure out where the non-duplicate is located (duplicates are good, non-duplicates are an issue to be investigated further).
1) If the non-duplicate in Column O, no problem, I can disregard, but I do want to find the cell in O without the conditional formatting and delete that cell and the cell to the right, shifting cells up.
2) If the non-duplicate is in Column B, I need to find the cell in B without the Conditional Formatting and highlight the cell in Column J of the same row in yellow so I can find it quickly.
3) If the values in S2 and T2 are identical, I can delete Columns O:T and call it a day.
Does all of that make sense? Can anyone offer any suggestions on how I should proceed?
I'm in the middle of coding a new macro and as one of my last steps, I want to compare the values of two cells and then take one of three steps depending on the outcome.
As part of the process, I have done a Conditional Formatting (font color used in the conditional formatting -16383844 and fill color 13551615) to look for duplicates in Columns B and O. I then do a COUNTA for both columns and display the results for Column B in S2 and Column O in T2. Ideally, both columns would have an identical number of cells with values. If not, I need to figure out where the non-duplicate is located (duplicates are good, non-duplicates are an issue to be investigated further).
1) If the non-duplicate in Column O, no problem, I can disregard, but I do want to find the cell in O without the conditional formatting and delete that cell and the cell to the right, shifting cells up.
2) If the non-duplicate is in Column B, I need to find the cell in B without the Conditional Formatting and highlight the cell in Column J of the same row in yellow so I can find it quickly.
3) If the values in S2 and T2 are identical, I can delete Columns O:T and call it a day.
Does all of that make sense? Can anyone offer any suggestions on how I should proceed?