Need help in If formula with multiple conditions

pankajgrover

Board Regular
Joined
Oct 27, 2022
Messages
157
Office Version
  1. 2021
Platform
  1. Windows
Hi, I want AQ6 should be blank cell if value is less than 1 in below example . How to configure this with existing formula
=IF(OR(AK3="",AN3=""),"",(H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))

Shares Trading test.xlsx
AQ
2P&L
33650.00
45480.00
5591.47
60.26
Vishal
Cell Formulas
RangeFormula
AQ3:AQ6AQ3=IF(OR(AK3="",AN3=""),"",(H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Perhaps
Excel Formula:
=IF(OR(AK3="",AN3=""),"",MAX((H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3),1))

OTOH your formula does not say what happens if AK3<>"S"...
 
Upvote 0
Perhaps
Excel Formula:
=IF(OR(AK3="",AN3=""),"",MAX((H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3),1))

OTOH your formula does not say what happens if AK3<>"S"...
Your formula giving 1 result instead of blank in AQ6. I want this cell should be blank.
 
Upvote 0
Better ?

Excel Formula:
=IF(OR(AK3="",AN3="",((H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))<1),"",(H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))
 
Upvote 0
Hi Thanks, its now doing 0 to Blank, but new issue arises it giving all -negative values to blank also. i did not think before <1 will give all negative values to Blank also . Actually i am calculating profit loss. Before i was doing set format 0;-0;;@ for convert 0 to blank then there was no issue . But one of my cell have figure now in AQ6 is 0.258, if i decrease decimal to single, it shows 0 but format 0;-0;;@ is not working here in the AQ6 cell. I also do not know how can i forcefully round 0.258 to this 0.00 so that this format 0;-0;;@ will work. Can we use round function to make cell AQ6=0 instead of decimals and then we can set format format 0;-0;;@. Or another alternate as you already provided formula can we change condition from <1 to (-1 to +1 range) then it should blank AQ6. As you master of excel please give me better advise. Thanks for support.
 
Last edited:
Upvote 0
Perhaps

=IF(OR(AK3="",AN3="",ABS(((H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3)))<1),"",(H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))
 
Upvote 0
Solution
Perhaps

=IF(OR(AK3="",AN3="",ABS(((H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3)))<1),"",(H3-O3)*B3*D3+IF(AK3="S",-K3+AO3-Q3-J3+AS3,-AO3+R3-Q3-J3+AS3))
Thanks its working now. Great support.
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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