简体   繁体   中英

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

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

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM