howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,567
Office Version
  1. 2021
Platform
  1. Windows
I have a vlookup combined with an index Function.


If I open up the workbook from where the formula looks up the values, I get a #Ref error in the formula in the destination workbook

=IFERROR(IF(VLOOKUP($B370&"",'[BR1March.xls]#Ref '!$A$1:$D$65536,4,FALSE)<=0,-VLOOKUP($B370&"",'[BR1March.xls]#Ref '!$A$1:$D$65536,4,FALSE),VLOOKUP($B370&"",'[BR1March.xls]#Ref '!$A$1:$D$65536,4,FALSE)),0)

Is there any way to avoid this ?
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
1. Your formula can be simplified to make it much shorter by simply placing ABS() around a single VLOOKUP

2. #REF looks like it had a cell reference in it before the error occurred referring to a sheet name.

Change your formula to this

=IFERROR(ABS(VLOOKUP($B370&"",INDIRECT("'[BR1March.xls]"&xxx&"'!$A$1:$D$65536"),4,FALSE)),0)

Replace xxx with whatever the cell reference was.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,215,622
Messages
6,125,889
Members
449,270
Latest member
bergy32204

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top