An Quala
Board Regular
- Joined
- Mar 21, 2022
- Messages
- 146
- Office Version
- 2021
- Platform
- Windows
Hello Everyone, can you please help me with a code that will sum up values based on condition,
Here are the details,
If sheet "Control Panel" Range(A2)=sheet "BOOK1" Range(B) (search in all rows from B2 to B down)
If sheet "Control Panel" Range(B2)=sheet "BOOK1" Range(L) (search in all rows in phrase from B2 to B down) (For example if in Control Panel there is "Apple" then it should consider "Apple Juice" not "Pineapple" in campaign names)
Sum the values of AH, AI, AK, AL AM and AN from BOOK1 and write the summed values in control panel in their corresponding columns,
In control panel, we should be able to add multiple values in Columns A and B,
This is not a very complex program, I might not be able to convey it properly but if you need, I can explain it even in more details, please let me know,
Thank you!
BOOK1
Control Panel
Here are the details,
If sheet "Control Panel" Range(A2)=sheet "BOOK1" Range(B) (search in all rows from B2 to B down)
If sheet "Control Panel" Range(B2)=sheet "BOOK1" Range(L) (search in all rows in phrase from B2 to B down) (For example if in Control Panel there is "Apple" then it should consider "Apple Juice" not "Pineapple" in campaign names)
Sum the values of AH, AI, AK, AL AM and AN from BOOK1 and write the summed values in control panel in their corresponding columns,
In control panel, we should be able to add multiple values in Columns A and B,
This is not a very complex program, I might not be able to convey it properly but if you need, I can explain it even in more details, please let me know,
Thank you!
BOOK1
Bulk File 07.06.22.xlsx | ||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | AA | AB | AC | AD | AE | AF | AG | AH | AI | AJ | AK | AL | AM | AN | AO | AP | AQ | AR | |||
1 | Product | Entity | Operation | Campaign Id | Ad Group Id | Portfolio Id | Ad Id (Read only) | Keyword Id (Read only) | Product Targeting Id (Read only) | Campaign Name | Ad Group Name | Campaign Name (Informational only) | Ad Group Name (Informational only) | Portfolio Name (Informational only) | Start Date | End Date | Targeting Type | State | Campaign State (Informational only) | Ad Group State (Informational only) | Daily Budget | SKU | ASIN (Informational only) | Ad Group Default Bid | Ad Group Default Bid (Informational only) | Bid | Keyword Text | Match Type | Bidding Strategy | Placement | Percentage | Product Targeting Expression | Resolved Product Targeting Expression (Informational only) | Impressions | Clicks | Click-through Rate | Spend | Sales | Orders | Units | Conversion Rate | Acos | CPC | ROAS | ||
2 | Sponsored Products | Campaign | 259139068650319 | Campaign ABC | Campaign ABC | 20220101 | AUTO | enabled | enabled | 1.00 | Fixed bid | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
3 | Sponsored Products | Bidding Adjustment | 259139068650319 | Campaign ABC | enabled | Fixed bid | placementTop | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
4 | Sponsored Products | Bidding Adjustment | 259139068650319 | Campaign ABC | enabled | Fixed bid | placementProductPage | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
5 | Sponsored Products | Ad Group | 259139068650319 | 257847586333260 | Ad Group | Campaign ABC | Ad Group | enabled | enabled | enabled | 0.50 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
6 | Sponsored Products | Product Ad | 259139068650319 | 257847586333260 | 103022664986421 | Campaign ABC | Ad Group | enabled | enabled | enabled | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||
7 | Sponsored Products | Product Targeting | 259139068650319 | 257847586333260 | 258946165082246 | Campaign ABC | Ad Group | enabled | enabled | enabled | 0.50 | 0.50 | close-match | close-match | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
8 | Sponsored Products | Product Targeting | 259139068650319 | 257847586333260 | 122119742464495 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | loose-match | loose-match | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
9 | Sponsored Products | Product Targeting | 259139068650319 | 257847586333260 | 237992570050613 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | complements | complements | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
10 | Sponsored Products | Product Targeting | 259139068650319 | 257847586333260 | 232189701876219 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | substitutes | substitutes | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
11 | Sponsored Products | Campaign | 83506138271425 | 142067021504153 | Campaign ABC | Campaign ABC | Portfolio DEF | 20211026 | MANUAL | enabled | enabled | 1.00 | Dynamic bids - down only | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
12 | Sponsored Products | Bidding Adjustment | 83506138271425 | Campaign ABC | Portfolio DEF | enabled | Dynamic bids - down only | placementProductPage | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||||
13 | Sponsored Products | Bidding Adjustment | 83506138271425 | Campaign ABC | Portfolio DEF | enabled | Dynamic bids - down only | placementTop | 20.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||||
14 | Sponsored Products | Ad Group | 83506138271425 | 37578778386913 | Ad Group | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | 0.50 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||
15 | Sponsored Products | Product Ad | 83506138271425 | 37578778386913 | 212342645931017 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | SKUABC | B0XXXXXXXX | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
16 | Sponsored Products | Keyword | 83506138271425 | 37578778386913 | 23992902474108 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | 0.50 | 0.55 | Keywords | phrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||
17 | Sponsored Products | Negative Keyword | 83506138271425 | 37578778386913 | 196272291225675 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | Keywords | negativePhrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
18 | Sponsored Products | Negative Keyword | 83506138271425 | 37578778386913 | 127314570814065 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | Keywords | negativePhrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
19 | Sponsored Products | Negative Keyword | 83506138271425 | 37578778386913 | 94457677669792 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | Keywords | negativePhrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
20 | Sponsored Products | Negative Keyword | 83506138271425 | 37578778386913 | 6340902182616 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | Keywords | negativePhrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
21 | Sponsored Products | Negative Keyword | 83506138271425 | 37578778386913 | 200103526221406 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | Keywords | negativePhrase | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
22 | Sponsored Products | Campaign | 165707835224571 | 142067021504153 | Campaign ABC | Campaign ABC | Portfolio DEF | 20211214 | MANUAL | enabled | enabled | 1.00 | Fixed bid | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
23 | Sponsored Products | Bidding Adjustment | 165707835224571 | Campaign ABC | Portfolio DEF | enabled | Fixed bid | placementProductPage | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||||
24 | Sponsored Products | Bidding Adjustment | 165707835224571 | Campaign ABC | Portfolio DEF | enabled | Fixed bid | placementTop | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||||
25 | Sponsored Products | Ad Group | 165707835224571 | 75645299640614 | Ad Group | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | 0.50 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||
26 | Sponsored Products | Product Ad | 165707835224571 | 75645299640614 | 199462666282967 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | SKUABC | B0XXXXXXXX | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||
27 | Sponsored Products | Keyword | 165707835224571 | 75645299640614 | 33605937547982 | Campaign ABC | Ad Group | Portfolio DEF | enabled | enabled | enabled | 0.50 | 0.30 | Keywords | broad | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||
28 | Sponsored Products | Campaign | 258754573589174 | Campaign ABC | Campaign ABC | 20220101 | AUTO | enabled | enabled | 1.00 | Fixed bid | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
29 | Sponsored Products | Bidding Adjustment | 258754573589174 | Campaign ABC | enabled | Fixed bid | placementProductPage | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
30 | Sponsored Products | Bidding Adjustment | 258754573589174 | Campaign ABC | enabled | Fixed bid | placementTop | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
31 | Sponsored Products | Ad Group | 258754573589174 | 153129680764393 | Ad Group | Campaign ABC | Ad Group | enabled | enabled | enabled | 0.50 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
32 | Sponsored Products | Product Ad | 258754573589174 | 153129680764393 | 205260612829258 | Campaign ABC | Ad Group | enabled | enabled | enabled | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||
33 | Sponsored Products | Product Targeting | 258754573589174 | 153129680764393 | 275458494159742 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | close-match | close-match | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
34 | Sponsored Products | Product Targeting | 258754573589174 | 153129680764393 | 146968282550236 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | loose-match | loose-match | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
35 | Sponsored Products | Product Targeting | 258754573589174 | 153129680764393 | 224116759652864 | Campaign ABC | Ad Group | enabled | enabled | enabled | 0.50 | 0.50 | complements | complements | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
36 | Sponsored Products | Product Targeting | 258754573589174 | 153129680764393 | 217549954321005 | Campaign ABC | Ad Group | paused | enabled | enabled | 0.50 | 0.50 | substitutes | substitutes | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
37 | Sponsored Products | Campaign | 80528116931698 | Campaign ABC | Campaign ABC | 20220101 | MANUAL | enabled | enabled | 1.00 | Fixed bid | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
38 | Sponsored Products | Bidding Adjustment | 80528116931698 | Campaign ABC | enabled | Fixed bid | placementTop | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
39 | Sponsored Products | Bidding Adjustment | 80528116931698 | Campaign ABC | enabled | Fixed bid | placementProductPage | 0.00 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||||
40 | Sponsored Products | Ad Group | 80528116931698 | 76107481712643 | Ad Group | Campaign ABC | Ad Group | enabled | enabled | enabled | 1.10 | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | ||||||||||||||||||||||||
41 | Sponsored Products | Product Ad | 80528116931698 | 76107481712643 | 147693024949029 | Campaign ABC | Ad Group | enabled | enabled | enabled | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||||||
42 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 8859256792213 | Campaign ABC | Ad Group | enabled | enabled | enabled | 1.10 | 0.63 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
43 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 247684218438325 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.63 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
44 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 158916859273288 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.66 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
45 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 118360102721703 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.66 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
46 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 260134484145018 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.63 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
47 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 30584086520380 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 1.07 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
48 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 263694419951020 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.46 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
49 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 150620715834560 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.63 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
50 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 239054561561844 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.79 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
51 | Sponsored Products | Keyword | 80528116931698 | 76107481712643 | 183475837427392 | Campaign DEF | Ad Group | enabled | enabled | enabled | 1.10 | 0.79 | Keywords | exact | 0 | 0 | 0.00% | 0.00 | 0.00 | 0 | 0 | 0.00 | 0.00% | 0.00 | 0.00 | |||||||||||||||||||||
BOOK1 |
Control Panel
Bulk File 07.06.22.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Entity | Campaign Name (phrase match) | Impressions | Clicks | Spend | Sales | Orders | Units | ||
2 | Keyword | ABC | ||||||||
3 | Product Targeting | DEF | ||||||||
4 | ||||||||||
5 | ||||||||||
6 | ||||||||||
7 | ||||||||||
8 | ||||||||||
9 | ||||||||||
10 | ||||||||||
11 | ||||||||||
12 | ||||||||||
13 | ||||||||||
14 | ||||||||||
15 | ||||||||||
16 | ||||||||||
17 | ||||||||||
Control Panel |