IF statement and subtractiom

vanilz

New Member
Joined
Sep 19, 2019
Messages
9
Hi Excel Gurus,

I have 2 tables, Stock availability and Sold item. Not sure if this is possible using excel if else and formula to subtract the availability stock.

If D3 or D4 filled with text available in A3:A4, then it take the quantity on E3 to subtract B3 and E4 subtract B4.

1613567537430.png


Thank you in advanced.
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Try this

Book1
ABCDEFG
1Stock availabilitySold item
2Item Description QuantityItem Description QuantityStock talley
3Apple20Apple515
4Banana16Banana88
5
Sheet1
Cell Formulas
RangeFormula
F3:F4F3=IF(E3>B3,"Over sold item",IF(A3=D3,B3-E3,"No items listed"))
 
Upvote 0
Try

Book2
ABCDEF
1Stock availabilitySold item
2Item DescriptionQuantityItem DescriptionQuantityDay End Stock
3Apple20Apple515
4Banana16Banana88
Sheet1
Cell Formulas
RangeFormula
F3:F4F3=SUMIF($A$3:$A$500,A3,$B$3:$B$500)-SUMIF($D$3:$D$500,D3,$E$3:$E$500)
 
Upvote 0
Tweek to mine.

Excel Formula:
=IF(AND(A3="",D3=""),"",IF(E3>B3,"Over sold item",IF(A3=D3,B3-E3,"No items listed")))
 
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,726
Members
448,987
Latest member
marion_davis

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