Hello,
Hopefully I will explain this correctly. I am looking for some assistance figuring out the best way to create a macro that will look at data in multiple columns and determine what is the account ownership.
I have possible ownership listed in columns AB-AI and also AR. Looking to create a code that will do the following.
If there is a Responsible Individual identified in column AR, then look in this column for business ownership and this will be the primary ownership ... the rest of the data in the remaining columns will be impacted businesses if different from Responsible Individual.
If there is no Responsible Executive, then look at the Business Name (Column AC), then look at Business Name2 (Column AD), then look at Business Name 6 (Column AG), then look at Business Name 7 (Column AH), then look at Business Name 8 (Column AI). Business Ownership should be listed within these columns, and I need the macro to look in that order. Majority of the time the data will be the same, but there will be instances where there might be additional businesses listed in the latter columns.
Anything in Business Name 3 and Business Name 4 (Columns AD and AE), then these will aways be listed in the impacted column (Column G).
If any of the columns (AR, AB, or AC) have "Business" in this column with an additional other business name, then the account is always "Not Owned" (Column BC) and "Shared" Column BD).
If any of the columns (AR, AB-AI) have "Business" and/or blanks in this column alone, then the account is always (Column BC) and "Business" (Column BD).
if any of the columns (AR, AB-AI) does not have "Business", then the account is an "owned" account (Column BC) and if there is a Responsible Individual identified in column AR, then look in this column for business ownership and this will be the primary ownership ... the rest of the data in the remaining columns will be impacted businesses if different from Responsible Individual.
In the Key sheet, I have some lookup values that I was thinking of using for this.
The goal is to weed through the data in the above-mentioned columns and provide "Final Results" in Columns (BC-BG).
Below is the best I could do to provide sample data.
Let me know if you need any further clarification.
Thank you,
Hopefully I will explain this correctly. I am looking for some assistance figuring out the best way to create a macro that will look at data in multiple columns and determine what is the account ownership.
I have possible ownership listed in columns AB-AI and also AR. Looking to create a code that will do the following.
If there is a Responsible Individual identified in column AR, then look in this column for business ownership and this will be the primary ownership ... the rest of the data in the remaining columns will be impacted businesses if different from Responsible Individual.
If there is no Responsible Executive, then look at the Business Name (Column AC), then look at Business Name2 (Column AD), then look at Business Name 6 (Column AG), then look at Business Name 7 (Column AH), then look at Business Name 8 (Column AI). Business Ownership should be listed within these columns, and I need the macro to look in that order. Majority of the time the data will be the same, but there will be instances where there might be additional businesses listed in the latter columns.
Anything in Business Name 3 and Business Name 4 (Columns AD and AE), then these will aways be listed in the impacted column (Column G).
If any of the columns (AR, AB, or AC) have "Business" in this column with an additional other business name, then the account is always "Not Owned" (Column BC) and "Shared" Column BD).
If any of the columns (AR, AB-AI) have "Business" and/or blanks in this column alone, then the account is always (Column BC) and "Business" (Column BD).
if any of the columns (AR, AB-AI) does not have "Business", then the account is an "owned" account (Column BC) and if there is a Responsible Individual identified in column AR, then look in this column for business ownership and this will be the primary ownership ... the rest of the data in the remaining columns will be impacted businesses if different from Responsible Individual.
In the Key sheet, I have some lookup values that I was thinking of using for this.
The goal is to weed through the data in the above-mentioned columns and provide "Final Results" in Columns (BC-BG).
Below is the best I could do to provide sample data.
Let me know if you need any further clarification.
Sample Data.xlsx | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | AO | AP | AQ | AR | BB | BC | BD | BE | BG | BH | ||||||||||||||||||||||||||||||||||||||
1 | Final Results | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2 | Account Number | BL1 | Business Name | Business Name 2 | Business Name 3 | Business Name 4 | Business Name 5 | Business Name 6 | Business Name 7 | Business Name 8 | Area1 | Area2 | Area3 | Area4 | Area5 | Area6 | Area7 | Area8 | Responsible Individual | Ownership | Main Focus | Owned Area | Impacted | Area | ||||||||||||||||||||||||||||||||||||||
3 | S123456 | GB | Business/Technology | Business/Technology | Technology | ET | GB/ET | GB | GB | GB | ET | Not Owned | Shared | Technology | GB | |||||||||||||||||||||||||||||||||||||||||||||||
4 | S456789 | ET | Business/Technology/Operations | Business/Technology/Operations | Business/Technology/Operations | GB/ET/IG | ICG | ICG | ET | ET | ICG | Not Owned | Shared | Technology/Operations | GB | |||||||||||||||||||||||||||||||||||||||||||||||
5 | S789123 | IG | Business | Business | Business | GB | IG | GB | GB | Not Owned | Business | IG | ||||||||||||||||||||||||||||||||||||||||||||||||||
6 | S456123 | PB | Operations | Operations | Technology | PB | PB | Owned | Ops | Operations | PB | |||||||||||||||||||||||||||||||||||||||||||||||||||
7 | S852741 | PB | Business | Business | PB | PB | PB | PB | Not Owned | Business | PB | |||||||||||||||||||||||||||||||||||||||||||||||||||
8 | S741963 | ET | Operations/Technology | Operations/Technology | Operations/Other | PB/ET | PB | ET | Technology | Owned | Tech | Technology | Operations | ET | ||||||||||||||||||||||||||||||||||||||||||||||||
9 | S741852 | GB | Technology/Business/Operations | Technology/Business/Operations | ET/Business | Technology | GB/ET | GB | GB | GB | Not Owned | Shared | Technology/Operations | GB | ||||||||||||||||||||||||||||||||||||||||||||||||
10 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Main |
Sample Data.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
W | X | Y | Z | AA | AB | |||
1 | Ownership | Main Focus | Owned Area | Region | Impacted | Area | ||
2 | Owned | Ops | Operations | PB | ||||
3 | Owned | Ops | Multi | PB | ||||
4 | Owned | Tech | Technolgy | ET | ||||
5 | Owned | Tech | Multi | ET | ||||
6 | Not Owned | Business | IG | |||||
7 | Not Owned | Shared | Operations | GB | ||||
8 | Not Owned | Shared | Technolgy | GB | ||||
Key |
Thank you,