Forum Discussion
Madyson8
Jul 06, 2023Copper Contributor
Highlighting a cell with a Reference error within it that isn't reporting a reference error
I need a way to highlight a cell with a VLookup formula with a reference error within it. When a column on a separate sheet is deleted, the formula has a reference error. It is not reporting a refe...
- Jul 07, 2023
Madyson8 You would need something like this:
=IF(ERROR.TYPE(VLOOKUP(B8,'13 WK'!#B:B!,1,0))=4,"Reference error in formula", IF(ISERROR(VLOOKUP(B8,'13 WK'!#B:B!,1,0)),$H$5,$H$4))As soon as column B gets deleted, the formula will display "Reference error in formula". Otherwise it will display either H5 or H4.
More on the ERROR.TYPe function here:
https://support.microsoft.com/en-us/office/error-type-function-10958677-7c8d-44f7-ae77-b9a9ee6eefaa
Riny_van_Eekelen
Jul 07, 2023Platinum Contributor
Madyson8 You would need something like this:
=IF(ERROR.TYPE(VLOOKUP(B8,'13 WK'!#B:B!,1,0))=4,"Reference error in formula", IF(ISERROR(VLOOKUP(B8,'13 WK'!#B:B!,1,0)),$H$5,$H$4))
As soon as column B gets deleted, the formula will display "Reference error in formula". Otherwise it will display either H5 or H4.
More on the ERROR.TYPe function here:
https://support.microsoft.com/en-us/office/error-type-function-10958677-7c8d-44f7-ae77-b9a9ee6eefaa
Madyson8
Jul 10, 2023Copper Contributor
Thank you very much!!