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

后端 未结 2 1107
借酒劲吻你
借酒劲吻你 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: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.

提交回复
热议问题