Forum Discussion
Conditional Vlookup
- May 10, 2023
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.
Thanks a ton for your valuable inputs and I was able to achieve desired results and now I was able to fetch values from other sheet ,but now I have a task to do where I need to replace all NULLS with it's corresponding values. Like in given below sheet , rows with "null's" needs to be replaced with "phazd0255lx01.phibred.com" values.
Server | New values |
phazd0255lx01.phibred.com | phazd0255lx01.phibred.com |
phazd0255lx01.phibred.com | phazd0255lx01.phibred.com |
null | phazd0255lx01.phibred.com |
phazd0255lx01.phibred.com | phazd0255lx01.phibred.com |
phazd0255lx01.phibred.com | phazd0255lx01.phibred.com |
Regards