hello
I am calculating how many bonus shares (Flag marked as B) I have received from the stock market for each of my stocks
and then also checking if I sell some bonus shares then how many are still in my portfolio
in this excel file, I have 2 sheets
sheet1 is for buying, selling and bonus shares received
sheet2 is to check the status that how many bonus shares were received and how many are left. if all are sold then I should get 0 in sheet2 cell D
(but in all cases, I want to keep the actual bonus shares received in sheet2 cell C)
I have multiple issues here in this sheet2:
1- if the cell H in sheet1 is blank then cell D in sheet2 is not counting the total (i should have a value of 0 at least in sheet1 cell H to get the result since the blank cell is not showing the count in sheet2 cell D)
2- if I partially or fully sell bonus shares in sheet1 then it's showing balance zero in all cases in sheet2 cell D (i am checking here to know how many are still in my portfolio)
kindly check and help.
thanks
I am calculating how many bonus shares (Flag marked as B) I have received from the stock market for each of my stocks
and then also checking if I sell some bonus shares then how many are still in my portfolio
in this excel file, I have 2 sheets
sheet1 is for buying, selling and bonus shares received
sheet2 is to check the status that how many bonus shares were received and how many are left. if all are sold then I should get 0 in sheet2 cell D
(but in all cases, I want to keep the actual bonus shares received in sheet2 cell C)
I have multiple issues here in this sheet2:
1- if the cell H in sheet1 is blank then cell D in sheet2 is not counting the total (i should have a value of 0 at least in sheet1 cell H to get the result since the blank cell is not showing the count in sheet2 cell D)
2- if I partially or fully sell bonus shares in sheet1 then it's showing balance zero in all cases in sheet2 cell D (i am checking here to know how many are still in my portfolio)
kindly check and help.
thanks
Test-Copy.xlsx | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | G | H | |||
1 | Stock name | Flag | Received | Sold | ||||||
2 | Apple | R | 100 | 0 | ||||||
3 | R | 150 | 0 | |||||||
4 | Intel | R | 200 | 0 | ||||||
5 | R | 250 | 0 | |||||||
6 | Apple | B | 10 | 5 | ||||||
7 | B | 15 | 0 | |||||||
8 | Intel | B | 20 | 0 | ||||||
9 | B | 25 | 0 | |||||||
10 | Apple | R | 200 | 0 | ||||||
11 | R | 250 | 0 | |||||||
12 | Intel | R | 300 | 0 | ||||||
13 | R | 350 | 0 | |||||||
14 | Apple | B | 15 | |||||||
15 | B | 20 | ||||||||
16 | Intel | B | 25 | |||||||
17 | B | 30 | ||||||||
Sheet1 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
C1:C4 | C1 | =SUMIFS(Sheet1!F:F,Sheet1!A:A,A1,Sheet1!C:C,"B") |
D1:D4 | D1 | =SUMIFS(Sheet1!F:F,Sheet1!A:A,A1,Sheet1!C:C,"B",Sheet1!H:H,0) |