Formula returns a zero
Hi , I used the following formula in one of my excel worksheet and the cell value returns a zero if value in cell B4 is not in the lookup data range. Is there a way to keep the cell value blank ? I now use a workaround by using the same color for the cell and font. Any advice ? =IF(B4="","",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)) Thanks Regards ST -- st24961 ------------------------------------------------------------------------ st24961's Profile: http://www.excelforum.com/member.php...o&userid=20530 View this thread: http://www.excelforum.com/showthread...hreadid=390805 |
This could perhaps give you some clues... =IF(B4="","",IF(VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)=0, "",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE))) Also... I usually us VLOOKUP(B4,$AD$3:$AE$48,2,FALSE) or 0 instead of False (same thing) to find exact matches. That way I don't need to sort the lookup table. Then use ...IF(ISERROR(VLOOKUP(B4,$AD$3:$AE$48,2,0)),"",... Hope it helped Ola Sandström -- olasa ------------------------------------------------------------------------ olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760 View this thread: http://www.excelforum.com/showthread...hreadid=390805 |
olasa Wrote: This could perhaps give you some clues... =IF(B4="","",IF(VLOOKUP(B4,$AD$3:$AE$48,2,TRUE)=0, "",VLOOKUP(B4,$AD$3:$AE$48,2,TRUE))) Also... I usually us VLOOKUP(B4,$AD$3:$AE$48,2,FALSE) or 0 instead of False (same thing) to find exact matches. That way I don't need to sort the lookup table. Then use ...IF(ISERROR(VLOOKUP(B4,$AD$3:$AE$48,2,0)),"",... Hope it helped Ola Sandström Hi, Apply your formula and it works. Thanks for your speedy reply. Regards ST -- st24961 ------------------------------------------------------------------------ st24961's Profile: http://www.excelforum.com/member.php...o&userid=20530 View this thread: http://www.excelforum.com/showthread...hreadid=390805 |
Happy it worked Thanks for your feedback Ola -- olasa ------------------------------------------------------------------------ olasa's Profile: http://www.excelforum.com/member.php...o&userid=17760 View this thread: http://www.excelforum.com/showthread...hreadid=390805 |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com