MrExcel Publishing
Your One Stop for Excel Tips & Solutions

VLOOKUP-returns "0" if number are less than zero

Posted by Squirrel on December 07, 2001 8:29 PM

Hello O great ones" First I would like to say that I visit this board on a daily basis for over a year and I owe alot to the people that post here including the Questions. Thanks to everyone. I have a spreedsheet that Imports a report using monarch from a AS400 system, Than I use VLOOKUP to fill the cells with the content needed. What I would like is to have the cell return zero where the number is less than zero. Example -5 (minus 5) may be returned

Posted by Bariloche on December 07, 2001 10:09 PM


If I understand your need correctly, just use your Vlookup in an "If" function, like so:


In other words, if vlookup is less than zero, put in zero, otherwise use the vlookup value.

have fun

Posted by IML on December 08, 2001 9:44 AM


Also, you could use