cornflakegirl
Well-known Member
- Joined
- Nov 4, 2004
- Messages
- 2,023
Hi everyone, I'm being a bit dense this afternoon, so would appreciate your help.
I have a spreadsheet with three columns. Column A is Brand, column B is Channel, column C is Measure. I'm trying to write some code to change some of the entries in columns B/C according to certain rules.
I have a table in a different spreadsheet that specifies these rules. It's a named range. The first column is Brand. The second column is current channel, the third is new channel. The fourth column is current measure, the fifth is new measure.
I want the code to match the brand, current channel and current measure, and then set the values in column B / C (of the original spreadsheet) to the new channel and new measure. Just to complicate things slightly, most of the lines in the named range table don't have a current or new channel, as they need the measure changing regardless of what the current channel is (and the channel doesn't need changing).
I thought some sort of concatenated VLOOKUP initially, and then I thought a loop - but I can't think of a good way to make a loop work within a named range. I may possibly be overthinking!
Can anyone help, please?
I have a spreadsheet with three columns. Column A is Brand, column B is Channel, column C is Measure. I'm trying to write some code to change some of the entries in columns B/C according to certain rules.
I have a table in a different spreadsheet that specifies these rules. It's a named range. The first column is Brand. The second column is current channel, the third is new channel. The fourth column is current measure, the fifth is new measure.
I want the code to match the brand, current channel and current measure, and then set the values in column B / C (of the original spreadsheet) to the new channel and new measure. Just to complicate things slightly, most of the lines in the named range table don't have a current or new channel, as they need the measure changing regardless of what the current channel is (and the channel doesn't need changing).
I thought some sort of concatenated VLOOKUP initially, and then I thought a loop - but I can't think of a good way to make a loop work within a named range. I may possibly be overthinking!
Can anyone help, please?