# help with formula

#### rwc2002

##### New member
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

#### Attachments

• example-2.xlsx
18.7 KB · Views: 15

#### Canapone

##### New member
Hi,

a first attempt could be in G2:

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

Regards

#### rwc2002

##### New member
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

#### Bob Phillips

##### Super Moderator
Staff member
ANother way

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

#### rwc2002

##### New member
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

#### Bob Phillips

##### Super Moderator
Staff member
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.