Vlookup: Vertical Lookup in Excel


Prevent #N/A Errors in VLOOKUP



Yüklə 15,49 Kb.
səhifə5/6
tarix05.01.2022
ölçüsü15,49 Kb.
#70000
1   2   3   4   5   6
3. Prevent #N/A Errors in VLOOKUP
If you want to prevent any #N/A errors in your VLOOKUP, you would have to use a series of functions:

  • =IFERROR() will return TRUE if the result of the VLOOKUP is an error. You could also use =ISNA().

  • =IF() can be used to test if the ISERROR() returns True. If an error is returned, then specify alternate text to be used, perhaps “Unknown Rep.” If an error is not returned, then you have Excel put in the results of the VLOOKUP.  

The following formula will replace the #N/A errors with alternate text.

=IF(ISERROR(VLOOKUP(C2,RepTable,2,FALSE)),"Unknown Rep",VLOOKUP(C2,RepTable,2,FALSE))



Tip: In Excel 2007, the new =IfError() function simplifies this formula:

=IFERROR(VLOOKUP(C2,RepTable,2,FALSE),"Unknown Rep")



6. Convert your lookup values to be the same type and format as the lookup table.

If none of the VLOOKUPs are working (all are returning a #N/A), it is possible that either the lookup value or the first column of the lookup table are in the wrong format. In this case, the values in column C are numeric and the values in column J are text.





Use a function to transform C2 to the proper format and the VLOOKUPs will work:

In this case the =TEXT() function converted numeric values to text with three digits. Some other useful functions for transforming data:

=UPPER() will convert text to upper case
=LOWER() will convert text to lower case
=PROPER() will convert text to proper case
=TRIM() will remove leading and trailing spaces from text
=VALUE() will convert numbers stored as text to values.


Yüklə 15,49 Kb.

Dostları ilə paylaş:
1   2   3   4   5   6




Verilənlər bazası müəlliflik hüququ ilə müdafiə olunur ©muhaz.org 2024
rəhbərliyinə müraciət

gir | qeydiyyatdan keç
    Ana səhifə


yükləyin