theworm1810
New Member
- Joined
- Mar 23, 2021
- Messages
- 2
- Office Version
- 2019
- Platform
- MacOS
Hello, I am really struggling right now. I have to create a pivot chart with "Industry" as a row field and "Count of Industry", and "Sum of Current Equity" as values. I then have to make a pie graph that summarizes the pivot data. I have no idea how to via code this. I've tried many YouTube videos but I always get errors. I don't know how to use an active code to do this. Any help would be so so appreciated. Thank you kindly.
MACRO.xlsm | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | |||
1 | id | Ticker | Industry | Exchange | Price | Change % | Marekt Cap | 52 High | 52 Low | P/E | Beta | Previous Close | Open | Instrument Type | Shares | Purchase Date | Average Purchase Price | Target | Investment | Current Equity | Return | % Change in Investment | Recommendation | ||
2 | AB23123 | AMAZON.COM, INC. (XNAS:AMZN) | Diversified Retail | XNAS | $ 3,135.73 | 0.01 | $ 1,556,952,000,000.00 | $ 3,552.25 | $ 1,689.24 | 74.05 | 1.13 | $ 3,091.86 | $ 3,073.22 | Stock | 2.00 | 8/22/19 | $ 2,502.73 | $ 3,000.00 | $ 5,005.46 | $ 6,271.46 | $ 1,266.00 | 0.25 | SELL | ||
3 | AC223 | WALMART INC. (XNYS:WMT) | Food & Drug Retailing | XNYS | $ 132.37 | -0.01 | $ 377,398,400,000.00 | $ 153.66 | $ 106.85 | 28.16 | 0.47 | $ 133.39 | $ 132.63 | Stock | 10.00 | 11/13/20 | $ 152.36 | $ 160.00 | $ 1,523.60 | $ 1,323.70 | $ (199.90) | -0.13 | HOLD | ||
4 | ZD21870 | AMERICAN EXPRESS COMPANY (XNYS:AXP) | Banking Services | XNYS | $ 144.66 | 0.01 | $ 115,440,900,000.00 | $ 151.46 | $ 67.00 | 38.07 | 1.29 | $ 143.30 | $ 144.76 | Stock | 2.00 | 7/11/18 | $ 130.54 | $ 140.00 | $ 261.08 | $ 289.32 | $ 28.24 | 0.11 | SELL | ||
5 | HJ874 | VISA INC. (XNYS:V) | Software & IT Services | XNYS | $ 223.12 | -0.01 | $ 480,245,800,000.00 | $ 228.23 | $ 133.93 | 49.88 | 1.00 | $ 224.70 | $ 225.33 | Stock | 3.00 | 11/8/19 | $ 253.54 | $ 300.00 | $ 760.62 | $ 669.36 | $ (91.26) | -0.12 | HOLD | ||
6 | GD889 | AMERICAN ASSETS TRUST, INC. (XNYS:AAT) | Residential & Commercial REIT | TSX | $ 34.98 | 0.02 | $ 2,073,031,000.00 | $ 36.60 | $ 20.15 | 74.12 | 1.27 | $ 34.28 | $ 34.21 | Stock | 100.00 | 8/7/20 | $ 50.43 | $ 150.00 | $ 5,043.00 | $ 3,498.00 | $ (1,545.00) | -0.31 | HOLD | ||
7 | DS8098 | AIRBNB, INC. (XNAS:ABNB) | Software & IT Services | XNAS | $ 201.36 | 0.01 | $ 119,852,900,000.00 | $ 219.94 | $ 121.50 | 45.54 | 1.25 | $ 200.01 | $ 195.63 | Stock | 32.00 | 12/21/17 | $ 123.32 | $ 150.00 | $ 3,946.24 | $ 6,443.52 | $ 2,497.28 | 0.63 | SELL | ||
8 | JH2398 | APPLE INC. (XNAS:AAPL) | Computers, Phones & Household Electronics | XNAS | $ 124.76 | -0.01 | $ 2,108,081,000,000.00 | $ 145.09 | $ 53.15 | 33.95 | 1.23 | $ 125.57 | $ 124.10 | Stock | 3.00 | 4/16/19 | $ 120.34 | $ 150.00 | $ 361.02 | $ 374.28 | $ 13.26 | 0.04 | HOLD | ||
9 | GT12801 | NIKE, INC. (XNYS:NKE) | Textiles & Apparel | NYSE | $ 144.99 | 0.00 | $ 228,039,300,000.00 | $ 147.95 | $ 60.00 | 82.58 | 0.90 | $ 144.65 | $ 143.20 | Stock | 2.00 | 7/1/21 | $ 154.23 | $ 165.00 | $ 308.46 | $ 289.98 | $ (18.48) | -0.06 | HOLD | ||
10 | AW298347 | THE TJX COMPANIES, INC. (XNYS:TJX) | Diversified Retail | XNYS | $ 67.26 | 0.01 | $ 80,106,110,000.00 | $ 71.06 | $ 32.72 | 1,092.70 | 0.98 | $ 66.72 | $ 66.89 | Stock | 10.00 | 2/2/19 | $ 66.23 | $ 100.00 | $ 662.30 | $ 672.60 | $ 10.30 | 0.02 | HOLD | ||
11 | OH3200 | Accolade Inc (XNAS:ACCD) | Healthcare Providers & Services | XNAS | $ 47.24 | 0.02 | $ 2,550,577,000.00 | $ 65.25 | $ 28.68 | 81.30 | 0.98 | $ 46.23 | $ 45.00 | Stock | 10.00 | 6/16/19 | $ 47.24 | $ 65.00 | $ 472.40 | $ 472.40 | $ - | 0.00 | HOLD | ||
12 | HY32082 | Biohaven Pharmaceutical Holding Company Limited (XNYS:BHVN) | Biotechnology & Medical Research | XNYS | $ 77.11 | 0.02 | $ 4,697,670,000.00 | $ 100.77 | $ 26.56 | 45.65 | 1.03 | $ 75.83 | $ 75.10 | Stock | 10.00 | 7/11/18 | $ 23.43 | $ 40.00 | $ 234.30 | $ 771.10 | $ 536.80 | 2.29 | SELL | ||
13 | QA9401 | BIOGEN INC. (XNAS:BIIB) | Pharmaceuticals | XNAS | $ 264.15 | 0.02 | $ 39,595,100,000.00 | $ 363.92 | $ 223.25 | 10.63 | 0.44 | $ 259.92 | $ 258.50 | Stock | 29.00 | 4/11/17 | $ 354.31 | $ 545.00 | $ 10,274.99 | $ 7,660.35 | $ (2,614.64) | -0.25 | HOLD | ||
14 | JS1983 | HDFC BANK LIMITED (XNYS:HDB) | Banking Services | TSX | $ 79.77 | -0.03 | $ 114,892,900,000.00 | $ 84.70 | $ 29.50 | 43.73 | 0.84 | $ 82.33 | $ 80.54 | Stock | 12.00 | 6/29/17 | $ 84.32 | $ 125.00 | $ 1,011.84 | $ 957.24 | $ (54.60) | -0.05 | HOLD | ||
15 | JS109238 | REGAL BELOIT CORPORATION (XNYS:RBC) | Machinery, Equipment & Components | XNYS | $ 153.25 | 0.03 | $ 6,054,251,000.00 | $ 154.96 | $ 51.99 | 32.18 | 1.38 | $ 149.05 | $ 148.86 | Stock | 4.00 | 3/24/17 | $ 153.45 | $ 155.00 | $ 613.80 | $ 613.00 | $ (0.80) | 0.00 | HOLD | ||
16 | AG102 | CANADIAN IMPERIAL BANK OF COMMERCE (XNYS:CM) | Banking Services | XNYS | $ 100.76 | 0.01 | $ 55,373,240,000.00 | $ 101.16 | $ 46.45 | 13.96 | 1.00 | $ 99.91 | $ 100.29 | Stock | 30.00 | 1/3/21 | $ 90.20 | $ 150.00 | $ 2,706.00 | $ 3,022.80 | $ 316.80 | 0.12 | HOLD | ||
17 | AY30981 | Altria Group, Inc. (XNYS:MO) | Food & Tobacco | XNYS | $ 49.75 | 0.01 | $ 91,893,620,000.00 | $ 49.95 | $ 30.95 | 20.50 | 0.67 | $ 49.44 | $ 49.44 | Stock | 5.00 | 9/14/18 | $ 100.23 | $ 50.00 | $ 501.15 | $ 248.75 | $ (252.40) | -0.50 | HOLD | ||
18 | AH9381 | ORACLE CORPORATION (XNYS:ORCL) | Software & IT Services | NASDAQ | $ 66.27 | -0.01 | $ 192,764,300,000.00 | $ 73.62 | $ 41.66 | 15.96 | 0.76 | $ 66.85 | $ 66.80 | Stock | 5.00 | 8/9/21 | $ 43.45 | $ 50.00 | $ 217.25 | $ 331.35 | $ 114.10 | 0.53 | SELL | ||
19 | JU67923 | INTERNATIONAL BUSINESS MACHINES CORPORATION (XNYS:IBM) | Software & IT Services | NASDAQ | $ 128.95 | 0.01 | $ 114,594,500,000.00 | $ 135.88 | $ 90.56 | 20.49 | 1.21 | $ 128.24 | $ 128.33 | Stock | 10.00 | 10/26/19 | $ 189.32 | $ 190.00 | $ 1,893.20 | $ 1,289.50 | $ (603.70) | -0.32 | HOLD | ||
20 | YT424 | THE CHILDREN'S PLACE, INC. (XNAS:PLCE) | Specialty Retailers | XNAS | $ 79.66 | -0.03 | $ 1,201,392,000.00 | $ 85.59 | $ 9.25 | 9.52 | 2.32 | $ 82.36 | $ 81.90 | Stock | 10.00 | 11/24/19 | $ 34.45 | $ 200.00 | $ 344.50 | $ 796.60 | $ 452.10 | 1.31 | HOLD | ||
21 | UY3908 | KINROSS GOLD CORPORATION (XNYS:KGC) | Metals & Mining | NYSE | $ 7.06 | 0.03 | $ 10,810,310,000.00 | $ 10.32 | $ 3.53 | 6.50 | 1.01 | $ 6.88 | $ 6.84 | Stock | 20.00 | 8/24/17 | $ 15.32 | $ 30.00 | $ 306.40 | $ 141.10 | $ (165.30) | -0.54 | HOLD | ||
22 | AW82309 | COSTCO WHOLESALE CORPORATION (XNAS:COST) | Diversified Retail | XNAS | $ 329.19 | 0.01 | $ 144,819,200,000.00 | $ 388.07 | $ 271.32 | 33.47 | 0.63 | $ 327.25 | $ 326.00 | Stock | 30.00 | 6/26/19 | $ 323.45 | $ 350.00 | $ 9,703.50 | $ 9,875.70 | $ 172.20 | 0.02 | HOLD | ||
23 | AT120 | SHOPIFY INC. (XNYS:SHOP) | Software & IT Services | XNYS | $ 1,170.86 | 0.02 | $ 141,437,400,000.00 | $ 1,499.75 | $ 305.30 | 447.49 | 1.46 | $ 1,143.17 | $ 1,122.01 | Stock | 3.00 | 7/20/21 | $ 802.32 | $ 825.00 | $ 2,406.96 | $ 3,512.58 | $ 1,105.62 | 0.46 | SELL | ||
24 | BY7909 | TARGET CORPORATION (XNYS:TGT) | Diversified Retail | XNYS | $ 178.18 | -0.01 | $ 89,855,630,000.00 | $ 199.96 | $ 90.17 | 20.84 | 0.99 | $ 180.21 | $ 179.85 | Stock | 93.00 | 12/25/20 | $ 179.54 | $ 200.00 | $ 16,697.22 | $ 16,570.74 | $ (126.48) | -0.01 | HOLD | ||
25 | XT13823902 | TESLA, INC. (XNAS:TSLA) | Automobiles & Auto Parts | XNAS | $ 701.81 | 0.04 | $ 649,705,600,000.00 | $ 900.40 | $ 70.10 | 1,088.54 | 2.02 | $ 676.88 | $ 655.81 | Stock | 2.00 | 1/11/17 | $ 702.34 | $ 850.00 | $ 1,404.68 | $ 1,403.62 | $ (1.06) | 0.00 | HOLD | ||
26 | TY2389 | Franco-Nevada Corporation (XNYS:FNV) | Metals & Mining | XNYS | $ 124.31 | 0.01 | $ 29,216,790,000.00 | $ 166.11 | $ 93.01 | 72.51 | 0.50 | $ 123.37 | $ 122.75 | Stock | 100.00 | 10/1/20 | $ 125.44 | $ 155.00 | $ 12,544.00 | $ 12,431.00 | $ (113.00) | -0.01 | HOLD | ||
27 | JU302982 | GENERAL MOTORS COMPANY (XNYS:GM) | Automobiles & Auto Parts | XNYS | $ 60.06 | 0.05 | $ 82,304,940,000.00 | $ 60.12 | $ 14.33 | 13.22 | 1.38 | $ 57.12 | $ 57.23 | Stock | 5.00 | 4/25/20 | $ 61.34 | $ 100.00 | $ 306.70 | $ 300.28 | $ (6.43) | -0.02 | HOLD | ||
28 | LO786 | WELLS FARGO & COMPANY (XNYS:WFC) | Banking Services | XNYS | $ 39.85 | 0.01 | $ 162,677,100,000.00 | $ 40.44 | $ 20.76 | 98.71 | 1.32 | $ 39.35 | $ 39.68 | Stock | 20.00 | 6/3/20 | $ 35.43 | $ 70.00 | $ 708.60 | $ 797.00 | $ 88.40 | 0.12 | HOLD | ||
29 | AL20897 | THE GAP, INC. (XNYS:GPS) | Specialty Retailers | XNYS | $ 31.60 | 0.01 | $ 11,654,750,000.00 | $ 32.95 | $ 5.26 | 29.90 | 1.68 | $ 31.16 | $ 31.12 | Stock | 10.00 | 7/11/21 | $ 10.34 | $ 25.00 | $ 103.40 | $ 316.00 | $ 212.60 | 2.06 | SELL | ||
30 | AT3270 | BARRICK GOLD CORPORATION (XETR:ABR) | Metals & Mining | TSX | $ 17.43 | 0.01 | $ 45,746,680,000.00 | $ 26.70 | $ 11.28 | 16.14 | 0.13 | $ 17.28 | $ 17.41 | Stock | 10.00 | 9/3/17 | $ 453.23 | $ 500.00 | $ 4,532.30 | $ 174.28 | $ (4,358.02) | -0.96 | HOLD | ||
31 | TH3810983 | FORD MOTOR COMPANY (XNYS:F) | Automobiles & Auto Parts | NYSE | $ 12.70 | 0.02 | $ 48,808,960,000.00 | $ 13.62 | $ 3.96 | 83.01 | 1.21 | $ 12.49 | $ 12.38 | Stock | 3.00 | 4/1/17 | $ 14.43 | $ 25.00 | $ 43.29 | $ 38.10 | $ (5.19) | -0.12 | HOLD | ||
Recommendation |
Cell Formulas | ||
---|---|---|
Range | Formula | |
S2:S31 | S2 | =O2*Q2 |
T2:T31 | T2 | =O2*E2 |
U2:U31 | U2 | =T2-S2 |
V2:V31 | V2 | =(T2-S2)/S2 |
W2:W31 | W2 | =IF(E2>=R2,"SELL","HOLD") |
Cells with Conditional Formatting | ||||
---|---|---|---|---|
Cell | Condition | Cell Format | Stop If True | |
W2:W31 | Cell Value | contains "HOLD" | text | NO |
W2:W31 | Cell Value | contains "SELL" | text | NO |
F2:F31 | Other Type | DataBar | NO | |
U2:U32 | Other Type | DataBar | NO | |
V2:V32 | Other Type | DataBar | NO |