digital786
03-12-2018, 09:53 AM
Hi Everyone Hope your all well.
Hopefully someone can help me with this, am trying to use VBA macro to help me generate a unique campaign code used in emails but i been stuck with it for a while now.
I have 2 sheets.
Sheet 1 (Campaign Codes) is where the unique ID code is going to go in cell 'D4'
Sheet 2 (Config) is where a list of all the campaign codes are held. column 'H2' down to 'H3000'
the campaign codes would be listed in numerical order for example campaign0001, campaign 0002, campaign0003
I have a button set in sheet 1 which i will assign the macro to.
Working example:
I press the macro button
Macro runs and brings back ONLY 1 unique E-code EACH TIME from the list in sheet 2, which has not been used before and inserts it into Sheet 1 (Campaign Codes) cell 'D4'
In the logic also to highlight the cell in sheet 2 of the unique E-Code which has been used in red and the rest remain in green. So when it comes to clicking the macro button it looks for cell in red and green back campaign code for the cell below in green.
I would be extremely great full if someone could help me with this. I've attached the document i am working on.
21807
Hopefully someone can help me with this, am trying to use VBA macro to help me generate a unique campaign code used in emails but i been stuck with it for a while now.
I have 2 sheets.
Sheet 1 (Campaign Codes) is where the unique ID code is going to go in cell 'D4'
Sheet 2 (Config) is where a list of all the campaign codes are held. column 'H2' down to 'H3000'
the campaign codes would be listed in numerical order for example campaign0001, campaign 0002, campaign0003
I have a button set in sheet 1 which i will assign the macro to.
Working example:
I press the macro button
Macro runs and brings back ONLY 1 unique E-code EACH TIME from the list in sheet 2, which has not been used before and inserts it into Sheet 1 (Campaign Codes) cell 'D4'
In the logic also to highlight the cell in sheet 2 of the unique E-Code which has been used in red and the rest remain in green. So when it comes to clicking the macro button it looks for cell in red and green back campaign code for the cell below in green.
I would be extremely great full if someone could help me with this. I've attached the document i am working on.
21807