# Thread: help with formula

1. ## help with formula

I have been trying to figure out a formula for my inventory sheet with no luck
maybe someone can help In the status column id like it to show if reorder is needed or in stock or out of stock i have attached a example of my inventory sheet

2. Hi,

a first attempt could be in G2:

=IF(E2=0,"OUT OF STOCK",IF(E2<=F2,"REORDER NEEDED","IN STOCK"))

Regards

3. Originally Posted by Canapone
Hi,

a first attempt could be in G2:

=IF(E2=0,"OUT OF STOCK",IF(E2<=F2,"REORDER NEEDED","IN STOCK"))

Regards
works great thanks so much

4. ANother way

=VLOOKUP((E2<F2)+(E2>F2)*2+(E2=0)*3,\$H\$2:\$I\$4,2,FALSE)

5. Originally Posted by Bob Phillips
ANother way

=VLOOKUP((E2<F2)+(E2>F2)*2+(E2=0)*3,\$H\$2:\$I\$4,2,FALSE)
thanks this is the way i was trying to do it but couldn't get it to work thanks again

6. If you reverse the text for items 2 and 3 in your table, you can use

=VLOOKUP(SIGN(E2-F2)+2,\$H\$2:\$I\$4,2,FALSE)

which is nicer.

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•