If condition

avisoft20

Board Regular
Joined
Sep 10, 2016
Messages
64
Dear All Experts,
I hope all is well,

I am working on the condition but have not received the proper result. Below is the table , condition is
1. Column A has a duplicate value
2. Required formula in H column (if column G1 is greater column F1 then its give result "ok" and also if G2 is greater than F1 its show "ok")


ABCDEFGHI
MaterialDescriptionMaterialUnitBOMMaterialBOM MatDescriptionStockMonthly Req. GZ01CalculationStatus
2002902IG BSMT DUBAR 1kg ctnCAR2205170POLY IG DUBAR 1KG 2,347 2,077 270 (=F3-G3) ok
2002974IG BSMT DUBAR 1kg PPBAG2205170POLY IG DUBAR 1KG 2,347 1,209 (939) =((F3-G3)-G4) no

Required your help
Thinkin you
avisoft20
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.
I think that there is something wrong in your question because of F1 is sharing the second function unless if you mean both are more than F1
try this

=IF(G1>F1,"OK",IF(G2>F1,"OK",""))
or this if you mean both to be more than F1
=IF(AND(G1>F1,G2>F1),"OK","")
 
Upvote 0
I think that there is something wrong in your question because of F1 is sharing the second function unless if you mean both are more than F1
try this

=IF(G1>F1,"OK",IF(G2>F1,"OK",""))
or this if you mean both to be more than F1
=IF(AND(G1>F1,G2>F1),"OK","")
If it's the first one I would use OR instead of nesting IFs
=IF(OR(G1>F1,G2>F1),"OK","")
 
Upvote 0
Your words referencing row 2 don't line up with your example, which seems to indicate that the heading row is row 2 and the first data line is row 3.
I think you might need something like this but I don't know how that would work if you added more data to the table and the BOM's aren't grouped together and in order.

Book1
ABCDEFGHI
1
2MaterialDescriptionMaterialUnitBOMMaterialBOM MatDescriptionStockMonthly Req. GZ01CalculationStatus
32002902IG BSMT DUBAR 1kg ctnCAR2205170POLY IG DUBAR 1KG2,3472,077270ok
42002974IG BSMT DUBAR 1kg PPBAG2205170POLY IG DUBAR 1KG2,3471,209(939)no
Sheet1
Cell Formulas
RangeFormula
H3:H4H3=F3-G3-IF(D3=D2,G2,0)
I3:I4I3=IF(H3>=0,"ok","no")
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,917
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