How to make cell Result as Blank, if one of sum of cells have no value

pankajgrover

Board Regular
Joined
Oct 27, 2022
Messages
99
Office Version
  1. 365
Platform
  1. Windows
How to make cell Result as Blank, if one of sum of cells have no value. In below example i want D3 and D4 should be result as blank until a3 and b4 have some values. Thanks
Shares Trading.xlsx
ABCD
1ItemABTotal
2pen250035001000
3pencil50005000
4rubber4000-4000
Sheet1
Cell Formulas
RangeFormula
D2:D4D2=C2-B2
 
You're welcome. Glad we got there in the end.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
You're welcome. Glad we got there in the end.
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 below

Shares Trading (1).xlsx
ABFGLMNPQR
2NameUnitsQtyPriceS.QtyS.PriceBrok.Diff.P&LI want this result in Q3
3Silver30.00169191.00169750.001000.0055915770P3*(L3 OR F3)*B3-N3
4Silver30.00164972.50-4060.5121815
5Silver30.000.564845.00-4188.062820
6Natural Gas1250.001433.00-3-3750
kk
Cell Formulas
RangeFormula
B3:B6B3=IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,2,0),0)
P3:P6P3=IF(M3="",C3,M3)-IF(G3="",C3,G3)
Named Ranges
NameRefers ToCells
Shares=OFFSET(Prices!$A$2,0,0,COUNTA(Prices!$A$2:$A$25))B3:B6
Cells with Data Validation
CellAllowCriteria
A3:A6List=Shares
 
Upvote 0
Using 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
BFGLMNPQR
2UnitsQtyPriceS.QtyS.PriceBrok.Diff.P&LI want this result in Q3
330169191169750100055915770P3*(L3 OR F3)*B3-N3
430164972.5-4060.5-121815
5300.564845-4188-62820
612501433-3-3750
Formula (2)
Cell Formulas
RangeFormula
Q3:Q6Q3=P3*IF(L3="",F3,L3)*B3-N3
 
Upvote 0
Using 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
BFGLMNPQR
2UnitsQtyPriceS.QtyS.PriceBrok.Diff.P&LI want this result in Q3
330169191169750100055915770P3*(L3 OR F3)*B3-N3
430164972.5-4060.5-121815
5300.564845-4188-62820
612501433-3-3750
Formula (2)
Cell Formulas
RangeFormula
Q3:Q6Q3=P3*IF(L3="",F3,L3)*B3-N3
thanks this solve my formula
 
Upvote 0
Here also i am doing 1 more some complex calculation . In below example AK3 i want actual result 15770. Actually i am trying to do use if formula but i am unable to do. In example my formula works if G4 or M6 have cell blank, but issue arise when G3 or M3 have some both values . So how to make formula to solve this in single AK Result Column,
How to create multiple conditions like i want
1st condition: =(F3-L3)*B3*C3+IF(G3="",-H3+AJ3,-AJ3+O3-N3) it works if G3 and M3 atleast hv 1 empty cell ,
2nd condition: If G3 and M3 no have empty cell then i want this calculation (((F3-L3)*B3)*C3)-H3+AJ3. how i make formula for this I want both conditions in AK3 column. Thanks

Shares Trading sat result.xlsx
ABCFGHLMNOAHAIAJAKAL
2NameUnitsLPQtyPriceAmountS.QtyS.PriceBrok.S.AmountQtyPriceAmountRESULTRESULT SHOULD BE in AK Col.
3Silver30.0069033.00169191.002075730169750.001000.002091500169750.002091500-100015770 FOR (((F3-L3)*B3)*C3)-H3+AJ3
4Silver30.0069033.00 164972.501949175168000.002040000-30990-30990
5Silver30.0069033.00 0.564845.009726750.568000.001020000-15495-15495
6Natural Gas1250.00430.401433.00541250 1410.005125002550025500
kk
Cell Formulas
RangeFormula
B3:B6B3=IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,2,0),0)
C3:C6C3=IFERROR(VLOOKUP(A3,Prices!$A$2:$C$25,3,0),0)
H3:H6H3=((F3*B3)*G3)
O3:O6O3=((L3*B3)*M3)-(N3)
AJ3:AJ6AJ3=((AH3*B3)*AI3)-(N3)
AK3:AK6AK3=(F3-L3)*B3*C3+IF(G3="",-H3+AJ3,-AJ3+O3-N3)
Named Ranges
NameRefers ToCells
Shares=OFFSET(Prices!$A$2,0,0,COUNTA(Prices!$A$2:$A$25))B3:C6
Cells with Data Validation
CellAllowCriteria
A3:A6List=Shares
 
Upvote 0
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))
 
Upvote 0
@Sufiyan97 here 1 example below i want if E2 AND D2 both cells hv data then only F2 Col. pick value from B col. if one of blank between E2 and D2 then corresponding F col. cell should be empty. how to write formula in F column. Thanks

New Microsoft Excel Worksheet.xlsx
ABCDEF
1ITEMBROKB.PRICES.PRICEBROK
2GOLD500100200500
3SILVER25090
Sheet1
 
Upvote 0

Forum statistics

Threads
1,215,777
Messages
6,126,838
Members
449,343
Latest member
DEWS2031

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top