Home > Net >  I need an excel formula that can calculate the restock or pat test amounts
I need an excel formula that can calculate the restock or pat test amounts

Time:09-14

I need a formula that will measure: If amount is less than restock amount then show restock | if amount is less than restock amount but there are items available then show pat test | if more than restock amount then show ok

CodePudding user response:

Take a look at this demo in Sheets:

https://docs.google.com/spreadsheets/d/1ChvT8xvdK5r7K-mFEu3Lh9KwHWxuURi03x5mNsDHDQU/edit#gid=0

So you have three conditions:

amount > restock
amount < restock AND items available > 0
amount < restock AND items available = 0

You can ignore the last part of the third condition as long as items available is never negative OR you don't care if you trigger the condition if items available is negative.

So in a pseudo code:

IF(
  amount > restock, "OK",
  IF (
    items available = 0, 
    "RESTOCK",
    "PAT TEST"

  )
)

Be aware that as formulated the conditions exclude cases where amount = restock, so you make the first condition amount >= restock.

Let me know if that does what you are after.

  • Related