Pulling data from big excel datatable with incremental column in Vlookup or IndexMatch without zeros

后端 未结 2 1108
借酒劲吻你
借酒劲吻你 2021-01-15 00:44

I am trying for a while to pull data for around 160 metrics for the last imported date and previous one so I can automate some stuff.

This is how my datatable looks

相关标签:
2条回答
  • 2021-01-15 01:09

    If you are sure that you only return numbers or empty cells, this would prevent a double lookup:

    =IFERROR(VALUE(A1&" "),"")
    

    In your case, substitute A1 with VLOOKUP($C$3,Table1[#All],2, FALSE)

    0 讨论(0)
  • 2021-01-15 01:24

    If you are returning a text based result, you can append a zero-length string to the VLOOKUP function.

    =VLOOKUP($C$3,Table1[#All],2, FALSE)&""
    

    This will not alter the string returned but will not show a zero when the return value would be blank.

    If you are returning numbers or dates then you have to check if the return value is blank.

    =IF(LEN(VLOOKUP($C$3,Table1[#All],2, FALSE)), VLOOKUP($C$3,Table1[#All],2, FALSE), "")
    

    Unfortunately, this is a double lookup much as we had to do to check for errors before the IFERROR function came along but so far, there is no native worksheet IFBLANK function.

    A UDF IFBLANK could be easily written.

    0 讨论(0)
提交回复
热议问题