Forum Discussion

AlokBeheria's avatar
AlokBeheria
Brass Contributor
May 09, 2023

Conditional Vlookup

Hello All,   I am trying to perform a conditional vlookup based on values. For example, I want to fetch server name from another sheet and only want to use vlookup where the columns shows only "nul...
  • mathetes's avatar
    mathetes
    May 10, 2023

    AlokBeheria 

     

    So a formula couldn't do that in the same cell where the NULL appears. Instead, you need to add what we often call a "helper column".

    Then, in that helper column you'd write your VLOOKUP formula, and, assuming that column B contains the reference to use in VLOOKUP, and that column C contains the "null" value, the resulting formula would go something like

    =IF(C11="null", VLOOKUP(B11,othertable,offset,0),C11)

    This would retain whatever value is in column C where that value is not "null" but, if it is "null", replace it with whatever is in that remote table where you're performing the lookup.

     

    If that doesn't help you, might I request that you post a copy of the workbook (including both sheets) on OneDrive or GoogleDrive, with a link pasted here that grants access. 

     

     

Resources