pankajgrover
Board Regular
- Joined
- Oct 27, 2022
- Messages
- 99
- Office Version
- 365
- Platform
- Windows
I am doing another column working but not been able to solve Q3 formula, so i enter manually results in Q3. Again want help for this example belowYou're welcome. Glad we got there in the end.
Shares Trading (1).xlsx | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | F | G | L | M | N | P | Q | R | |||||||||||
2 | Name | Units | Qty | Price | S.Qty | S.Price | Brok. | Diff. | P&L | I want this result in Q3 | ||||||||||
3 | Silver | 30.00 | 1 | 69191.00 | 1 | 69750.00 | 1000.00 | 559 | 15770 | P3*(L3 OR F3)*B3-N3 | ||||||||||
4 | Silver | 30.00 | 1 | 64972.50 | -4060.5 | 121815 | ||||||||||||||
5 | Silver | 30.00 | 0.5 | 64845.00 | -4188.0 | 62820 | ||||||||||||||
6 | Natural Gas | 1250.00 | 1 | 433.00 | -3 | -3750 | ||||||||||||||
kk |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B3:B6 | B3 | =IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,2,0),0) |
P3:P6 | P3 | =IF(M3="",C3,M3)-IF(G3="",C3,G3) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
Shares | =OFFSET(Prices!$A$2,0,0,COUNTA(Prices!$A$2:$A$25)) | B3:B6 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
A3:A6 | List | =Shares |
22 12 25.xlsm | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B | F | G | L | M | N | P | Q | R | |||||||||||
2 | Units | Qty | Price | S.Qty | S.Price | Brok. | Diff. | P&L | I want this result in Q3 | ||||||||||
3 | 30 | 1 | 69191 | 1 | 69750 | 1000 | 559 | 15770 | P3*(L3 OR F3)*B3-N3 | ||||||||||
4 | 30 | 1 | 64972.5 | -4060.5 | -121815 | ||||||||||||||
5 | 30 | 0.5 | 64845 | -4188 | -62820 | ||||||||||||||
6 | 1250 | 1 | 433 | -3 | -3750 | ||||||||||||||
Formula (2) |
Cell Formulas | ||
---|---|---|
Range | Formula | |
Q3:Q6 | Q3 | =P3*IF(L3="",F3,L3)*B3-N3 |
thanks this solve my formulaUsing what you wrote in cell R3 it seems this is what you want. .. but it does not match the values you wrote in some of the other rows where you gave no indication of any different calculation.
22 12 25.xlsm
B F G L M N P Q R 2 Units Qty Price S.Qty S.Price Brok. Diff. P&L I want this result in Q3 3 30 1 69191 1 69750 1000 559 15770 P3*(L3 OR F3)*B3-N3 4 30 1 64972.5 -4060.5 -121815 5 30 0.5 64845 -4188 -62820 6 1250 1 433 -3 -3750 Formula (2)
Cell Formulas Range Formula Q3:Q6 Q3 =P3*IF(L3="",F3,L3)*B3-N3
Shares Trading sat result.xlsx | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
A | B | C | F | G | H | L | M | N | O | AH | AI | AJ | AK | AL | ||||||||||||||||||||||||||
2 | Name | Units | LP | Qty | Price | Amount | S.Qty | S.Price | Brok. | S.Amount | Qty | Price | Amount | RESULT | RESULT SHOULD BE in AK Col. | |||||||||||||||||||||||||
3 | Silver | 30.00 | 69033.00 | 1 | 69191.00 | 2075730 | 1 | 69750.00 | 1000.00 | 2091500 | 1 | 69750.00 | 2091500 | -1000 | 15770 FOR (((F3-L3)*B3)*C3)-H3+AJ3 | |||||||||||||||||||||||||
4 | Silver | 30.00 | 69033.00 | 1 | 64972.50 | 1949175 | 1 | 68000.00 | 2040000 | -30990 | -30990 | |||||||||||||||||||||||||||||
5 | Silver | 30.00 | 69033.00 | 0.5 | 64845.00 | 972675 | 0.5 | 68000.00 | 1020000 | -15495 | -15495 | |||||||||||||||||||||||||||||
6 | Natural Gas | 1250.00 | 430.40 | 1 | 433.00 | 541250 | 1 | 410.00 | 512500 | 25500 | 25500 | |||||||||||||||||||||||||||||
kk |
Cell Formulas | ||
---|---|---|
Range | Formula | |
B3:B6 | B3 | =IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,2,0),0) |
C3:C6 | C3 | =IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,3,0),0) |
H3:H6 | H3 | =((F3*B3)*G3) |
O3:O6 | O3 | =((L3*B3)*M3)-(N3) |
AJ3:AJ6 | AJ3 | =((AH3*B3)*AI3)-(N3) |
AK3:AK6 | AK3 | =(F3-L3)*B3*C3+IF(G3="",-H3+AJ3,-AJ3+O3-N3) |
Named Ranges | ||
---|---|---|
Name | Refers To | Cells |
Shares | =OFFSET(Prices!$A$2,0,0,COUNTA(Prices!$A$2:$A$25)) | B3:C6 |
Cells with Data Validation | ||
---|---|---|
Cell | Allow | Criteria |
A3:A6 | List | =Shares |
Thanks its working perfect .Try in AK3
Excel Formula:=IF(AND(G3<>"",M3<>""),(((F3-L3)*B3)*C3)-H3+AJ3,(F3-L3)*B3*C3+IF(G3="",-H3+AJ3,-AJ3+O3-N3))
New Microsoft Excel Worksheet.xlsx | ||||||||
---|---|---|---|---|---|---|---|---|
A | B | C | D | E | F | |||
1 | ITEM | BROK | B.PRICE | S.PRICE | BROK | |||
2 | GOLD | 500 | 100 | 200 | 500 | |||
3 | SILVER | 250 | 90 | |||||
Sheet1 |