OilEconomist
Active Member
- Joined
- Dec 26, 2016
- Messages
- 439
- Office Version
- 2019
- Platform
- Windows
Hello and thanks in advance. My objective is to copy a row from one sheet to the next based on if two of the cells meet the following conditions.
If column A equals a value say "Home" and column M does not equal "Red", "Green", or "Yellow".
I have the code for everything else except on writing the conditions. I've tried the following:
If (Cells(i, 1) = "Home") And (Cells(i, 13) <> "Red" or Cells(i, 13) <> "Green" Or Cells(i, 13) <> "Yellow")
I've also tried combinations of this statement where I make multiple loops, but anything I've tried gets the incorrect result.
Any assistance will be much appreciated.
If column A equals a value say "Home" and column M does not equal "Red", "Green", or "Yellow".
I have the code for everything else except on writing the conditions. I've tried the following:
If (Cells(i, 1) = "Home") And (Cells(i, 13) <> "Red" or Cells(i, 13) <> "Green" Or Cells(i, 13) <> "Yellow")
I've also tried combinations of this statement where I make multiple loops, but anything I've tried gets the incorrect result.
Any assistance will be much appreciated.