Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 11
Default IF/ISBLANK formula

When using this formula =IF(ISBLANK(B2,"",VLOOKUP(B2,D2:E20,2,1)) I am
getting the #N/A error or incorrect data if the value in cell B2 starts with
a 0 eg 07934.
Any suggestions as to fix this?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 41
Default IF/ISBLANK formula

Have you taken into account this remark for VLOOKUP function:

When searching number or date values, ensure that the data in the first
column of table_array is not stored as text values. In this case, VLOOKUP
might return an incorrect or unexpected value.
?


"Missile" wrote in message
...
When using this formula =IF(ISBLANK(B2,"",VLOOKUP(B2,D2:E20,2,1)) I am
getting the #N/A error or incorrect data if the value in cell B2 starts
with
a 0 eg 07934.
Any suggestions as to fix this?

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF/ISBLANK formula

Try an exact match, TRIM the lookup value in B2, and fix ($) the ref table:
=IF(TRIM(B2)="","",VLOOKUP(TRIM(B2),$D$2:$E$20,2,0 ))
The above will increase the robustness of your expression, and readies it
for propagation down the column. Any joy? hit YES to celebrate it
--
Max
Singapore
---
"Missile" wrote:
When using this formula =IF(ISBLANK(B2,"",VLOOKUP(B2,D2:E20,2,1)) I am
getting the #N/A error or incorrect data if the value in cell B2 starts with
a 0 eg 07934.
Any suggestions as to fix this?

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default IF/ISBLANK formula

... value in cell B2 starts with a 0 eg 07934.
Try adding a zero to coerce the text number in B2 to a real number for
consistent matching, viz: =VLOOKUP(B2+0, ...
--
Max
Singapore
---

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
multiple cells with isblank formula yoly Excel Discussion (Misc queries) 5 September 15th 09 07:30 PM
IF AND ISTEXT ISBLANK formula SCrowley Excel Worksheet Functions 5 October 6th 08 11:42 PM
if(and(isblank( formula help JC Excel Worksheet Functions 2 May 22nd 08 11:25 PM
ISBLANK Formula Help pt_lily Excel Discussion (Misc queries) 4 June 12th 07 04:40 PM
ISBLANK Formula Help Request John C. Harris, MPA Excel Worksheet Functions 4 July 22nd 05 10:06 PM


All times are GMT +1. The time now is 02:27 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"