Modifying an Inventory/Purchase Order formula containing multiple IF Functions

ak_254

New Member
Joined
Jan 9, 2018
Messages
10
Hi all,

I am having some difficulties with creating an inventory formula where on Sheet 1 I have inventory information where I keep key info such as the part number, current stock level of the part, and the status of any restock order pending. On Sheet 2 I have a list containing all restock orders currently being placed where in Cell D the Order Aging is determined if the order was received in Cell C. If Yes no calculations is made in Cell D, If No the Order Date is subtracted from Today's date calculating a number in Cell D.

I want to create a formula where on Sheet 1 Cell C it provides the current stock level of a part and a notification if a restock order is being placed.

The below formula is what I currently have and is working as intended with the exception of when a part is marked "Out of Stock" in Cell B on Sheet 1 with an restock order pending with an order aging from Sheet 2.

It currently produces the results with an order aging: "Out of Stock" (Should only state just "Out of Stock" if there is no current orders being placed on Sheet 2)
Should produce the result with an order aging from Sheet 2: "Out of Stock, Restock Order Placed"


On Sheet 1 Cell C4: IF(B4="Out of Stock","Out of Stock",IF(SUMIF('Sheet 2'!A:A,A4,'Sheet 2'!D:D)>0,B4&", Restock Order Placed","In Stock"))


Sheet 1. (Contains Inventory Info)

A
B
C
1
Part Number
Stock Level
Order Status
2
123-111
High
In Stock
3
123-222
Low
Low, Restock Order Placed
4
123-333
Out of Stock
(Out of Stock, Restock Order Placed)

<tbody>
</tbody>


Sheet 2. (Contains Orders)

A
B
C
D
1
Part Number
Order Date
Order Received
Order Aging
2
123-111
2/1/2018
Yes
3
123-222
2/5/2018
No
1
4
123-333
2/5/2018
No
1

<tbody>
</tbody>

Please let me know if anyone has any questions and any help or point in the right direction is greatly appreciated!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Give this a try...

=IF(B4="High","In Stock",B4 & IF(SUMIF('Sheet 2'!A:A,A4,'Sheet 2'!D:D)>0,", Restock Order Placed", ""))
 
Upvote 0
Give this a try...

=IF(B4="High","In Stock",B4 & IF(SUMIF('Sheet 2'!A:A,A4,'Sheet 2'!D:D)>0,", Restock Order Placed", ""))

Hi AlphaFrog,

Thanks for the response! That modification produced exactly the response I wanted for the status "Out of Stock" however in addition I was wondering if there was any way for when the Status is "Low" to state "In Stock" and if it is "Low" with an restock order placed with an order aging on Sheet 2 to state "Low, Restock Order Placed."
 
Upvote 0
=CHOOSE((B4="High")+(B4="Low")*2+(B4="Out of Stock")*3+(SUMIF('Sheet 2'!A:A,A4,'Sheet 2'!D:D)>0)*2,B4,"In Stock",B4, "Low, Restock Order Placed", "Out of Stock, Restock Order Placed")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,525
Messages
6,131,183
Members
449,630
Latest member
parkjun

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