Andrew Quirl
New Member
Hi Guys, this looks like a great forum. I would appreciate any help you can provide on this issue I'm having. I've gone thru several drafts or versions of this particular section of an overall macro project I'm working on. This little section is giving me fits. I have posted this on a couple of other forums, but the conversation is getting long and no results yet. So I decided to streamline my question to just the part I need help with and post it here fresh.
What I'm trying to achieve here is to move some part #s from one column to another based on criteria. I started out trying to do this with a filtering process and moving visible cells after a filter. This had several challenges so now I'm thinking it may be best to have the if/then statement go through row by row applying a set of criteria.
So looking at one row at a time ... (example row 2) and these can be 3 separate subroutines that run in order:
POPULATING BEST MATCH COLUMN R:
-IF K2 has yellow fill RGB(255, 255, 0), THEN copy the value in K2 to R2.
-IF K2 does NOT have yellow fill, and N2 does have yellow fill, THEN copy value in N2 to R2.
-IF K2 does NOT have yellow fill, and N2 does NOT have yellow fill, and K2 has a value that is a part#, THEN copy K2 to R2.
-IF K2 does NOT have yellow fill, and N2 does NOT have yellow fill, and K2 does NOT have a part# as the value, THEN copy whatever value exists in N2 to R2 whether it is a part# or not.
POPULATING UPGRADE COLUMN V:
IF M2 has orange fill RGB(255, 192, 0), and the value in N2 does not already appear in R2, then copy the value in N2 to V2.
POPULATING ECONOMICAL COLUMN T:
IF M2 has green fill RGB(146, 208, 80), and the value in N2 does not already appear in R2, then copy the value in N2 to T2.
What I'm trying to achieve here is to move some part #s from one column to another based on criteria. I started out trying to do this with a filtering process and moving visible cells after a filter. This had several challenges so now I'm thinking it may be best to have the if/then statement go through row by row applying a set of criteria.
So looking at one row at a time ... (example row 2) and these can be 3 separate subroutines that run in order:
POPULATING BEST MATCH COLUMN R:
-IF K2 has yellow fill RGB(255, 255, 0), THEN copy the value in K2 to R2.
-IF K2 does NOT have yellow fill, and N2 does have yellow fill, THEN copy value in N2 to R2.
-IF K2 does NOT have yellow fill, and N2 does NOT have yellow fill, and K2 has a value that is a part#, THEN copy K2 to R2.
-IF K2 does NOT have yellow fill, and N2 does NOT have yellow fill, and K2 does NOT have a part# as the value, THEN copy whatever value exists in N2 to R2 whether it is a part# or not.
POPULATING UPGRADE COLUMN V:
IF M2 has orange fill RGB(255, 192, 0), and the value in N2 does not already appear in R2, then copy the value in N2 to V2.
POPULATING ECONOMICAL COLUMN T:
IF M2 has green fill RGB(146, 208, 80), and the value in N2 does not already appear in R2, then copy the value in N2 to T2.
Attachments
Last edited: