Dragging a formula produces #Ref error

royhern

Board Regular
Hey guys i tried to drag this formula top to buttom but i get #ref error

=IF(ISERROR((VLOOKUP(\$C11,Data!1:65536,4))),"",(VLOOKUP(\$C11,Data!1:65536,4)))

=IF(ISERROR((VLOOKUP(\$C11,Data!#REF!,4))),"",(VLOOKUP(\$C11,Data!#REF!,4)))

and i changed it to :

=IF(ISERROR(VLOOKUP(\$C11,Data,4,FALSE)),"",VLOOKUP(\$C11,Data,4,FALSE))

But i get a blank cell?

Any ideas...?

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.

Yogi Anand

MrExcel MVP
Hi royhern:

I don't know the context or the formulas you are using -- however

in your formulation, the expression ... Data!1:65536, the arguments 1 and 65536 are both relative, so when you drag it down it tends to become Data!2:65537 -- and since the maximum row number is only 65536, you are getting the #REF! error.

So, look at the possibility of using ... Data!1:\$65536 -- when you drag it down, it will result in ... Data!2:\$65536

I hope this helps!

just_jon

Legend
royhern said:
Hey guys i tried to drag this formula top to buttom but i get #ref error

=IF(ISERROR((VLOOKUP(\$C11,Data!1:65536,4))),"",(VLOOKUP(\$C11,Data!1:65536,4)))

=IF(ISERROR((VLOOKUP(\$C11,Data!#REF!,4))),"",(VLOOKUP(\$C11,Data!#REF!,4)))

and i changed it to :

=IF(ISERROR(VLOOKUP(\$C11,Data,4,FALSE)),"",VLOOKUP(\$C11,Data,4,FALSE))

But i get a blank cell?

Any ideas...?

A couple of things -- first, using the whole sheet as your lookup array [1:65536] is a bad idea; it's also why you get a REF error. When you drag it, 1:65536 changes to 2:65537, etc -- definitely NOT good. More clearly define your ranges for the vlookup, and then anchor your references [those you wish not to change as the formula moves] with \$ as in \$A\$1:\$D\$100.

Do you have a named range called Data? If so, how is it defined? My guess is no, and the reason you're getting a blank on that last formula is that, as you've not given vlookup a range but only a sheet name, it ISERROR, and is doing exactly what you have told it do do, return "".

Use of ISERROR is highly discouraged. See -- http://www.mrexcel.com/board2/viewtopic.php?t=62102

royhern

Board Regular
thanks got it...i forgot to defined the range..

Brian from Maui

MrExcel MVP
royhern said:
Hey guys i tried to drag this formula top to buttom but i get #ref error

=IF(ISERROR((VLOOKUP(\$C11,Data!1:65536,4))),"",(VLOOKUP(\$C11,Data!1:65536,4)))

=IF(ISERROR((VLOOKUP(\$C11,Data!#REF!,4))),"",(VLOOKUP(\$C11,Data!#REF!,4)))

and i changed it to :

=IF(ISERROR(VLOOKUP(\$C11,Data,4,FALSE)),"",VLOOKUP(\$C11,Data,4,FALSE))

But i get a blank cell?

Any ideas...?

On using ISERROR,

http://216.92.17.166/board2/viewtopic.php?t=62102

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,168,037
Messages
5,856,962
Members
431,841
Latest member
jaybeem

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.

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

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