#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup problem

Hi all,

I posted the following in application errors, but I think I posted it in the
wrong. Hopefully, this is the right group. :)

Why does the following formula work:

=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))

But this one doesn't (I get a #REF error):

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default vlookup problem

"Robbyn" wrote...
....
Why does the following formula work:

=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",
VLOOKUP($B$1,Database,217,0))

But this one doesn't (I get a #REF error):

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",
VLOOKUP($B$1,Database,218,0))


This is what would happen if the range named Database spanned only 217
columns.


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 287
Default vlookup problem

Perhaps database only has 217 columns?

"Robbyn" wrote:

Hi all,

I posted the following in application errors, but I think I posted it in the
wrong. Hopefully, this is the right group. :)

Why does the following formula work:

=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))

But this one doesn't (I get a #REF error):

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup problem

The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(Da ta!$1:$1))

"daddylonglegs" wrote:

Perhaps database only has 217 columns?

"Robbyn" wrote:

Hi all,

I posted the following in application errors, but I think I posted it in the
wrong. Hopefully, this is the right group. :)

Why does the following formula work:

=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))

But this one doesn't (I get a #REF error):

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default vlookup problem

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))

....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd argument OR
when the cell in the row matching its 1st argument in the column given by
its 3rd argument just happens to evaluate to #REF!.




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup problem

Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of columns,
but built rows as we added data. There is data in the column the formula is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))

....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd argument OR
when the cell in the row matching its 1st argument in the column given by
its 3rd argument just happens to evaluate to #REF!.



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default vlookup problem

Excel is only a computer program. If you change the size of something and do
not tell Excel, it has no idea what you did.

"Robbyn" wrote in message
...
Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of
columns,
but built rows as we added data. There is data in the column the formula
is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug
the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being
obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))

....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd argument
OR
when the cell in the row matching its 1st argument in the column given by
its 3rd argument just happens to evaluate to #REF!.





  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup problem

The only thing I changed was which column I wanted the formula to reference.
That's it. The column has data and its part of the range, "Database". I'm
missing something somewhere and its driving me nuts.

"Tyro" wrote:

Excel is only a computer program. If you change the size of something and do
not tell Excel, it has no idea what you did.

"Robbyn" wrote in message
...
Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of
columns,
but built rows as we added data. There is data in the column the formula
is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug
the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being
obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))
....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd argument
OR
when the cell in the row matching its 1st argument in the column given by
its 3rd argument just happens to evaluate to #REF!.






  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default vlookup problem

What is the formula?

"Robbyn" wrote in message
...
The only thing I changed was which column I wanted the formula to
reference.
That's it. The column has data and its part of the range, "Database".
I'm
missing something somewhere and its driving me nuts.

"Tyro" wrote:

Excel is only a computer program. If you change the size of something and
do
not tell Excel, it has no idea what you did.

"Robbyn" wrote in message
...
Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of
columns,
but built rows as we added data. There is data in the column the
formula
is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug
the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being
obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))
....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd
argument
OR
when the cell in the row matching its 1st argument in the column given
by
its 3rd argument just happens to evaluate to #REF!.








  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 33
Default vlookup problem

As a followup,

For some reason I had to redefine my range with a finite number of columns
instead of dynamic . After I did that, the vlookup worked. No clue why...

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(Da ta!$1:$1))

to

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),225)

"Tyro" wrote:

What is the formula?

"Robbyn" wrote in message
...
The only thing I changed was which column I wanted the formula to
reference.
That's it. The column has data and its part of the range, "Database".
I'm
missing something somewhere and its driving me nuts.

"Tyro" wrote:

Excel is only a computer program. If you change the size of something and
do
not tell Excel, it has no idea what you did.

"Robbyn" wrote in message
...
Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of
columns,
but built rows as we added data. There is data in the column the
formula
is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug
the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being
obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))
....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd
argument
OR
when the cell in the row matching its 1st argument in the column given
by
its 3rd argument just happens to evaluate to #REF!.











  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default vlookup problem

If you put these in a couple of unused cells in a temporary worksheet

=counta(data!$a:$a)
and
=counta(data!$1:$1)

what values are returned?

It could explain why your formula didn't work.

Robbyn wrote:

As a followup,

For some reason I had to redefine my range with a finite number of columns
instead of dynamic . After I did that, the vlookup worked. No clue why...

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(Da ta!$1:$1))

to

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),225)

"Tyro" wrote:

What is the formula?

"Robbyn" wrote in message
...
The only thing I changed was which column I wanted the formula to
reference.
That's it. The column has data and its part of the range, "Database".
I'm
missing something somewhere and its driving me nuts.

"Tyro" wrote:

Excel is only a computer program. If you change the size of something and
do
not tell Excel, it has no idea what you did.

"Robbyn" wrote in message
...
Hi Harlan,

Thank you for your reply. I guess I'm trying not to be too obtuse. I
thought that my named range, "Database", didn't limit the number of
columns,
but built rows as we added data. There is data in the column the
formula
is
referencing, but I get the ref error.
The formula
=IF(ISBLANK(VLOOKUP($B$1,Database,217,0)),"",VLOOK UP($B$1,Database,217,0))
returns the correct data from column HI on my data sheet, but if I plug
the
same data in HJ and use the formula

=IF(ISBLANK(VLOOKUP($B$1,Database,218,0)),"",VLOOK UP($B$1,Database,218,0))

I get the ref error

I'm wondering if vlookup limits the number of columns? Or am I being
obtuse?

"Harlan Grove" wrote:

"Robbyn" wrote...
The "database" range:

=OFFSET(Data!$A$2,0,0,COUNTA(Data!$A:$A),COUNTA(D ata!$1:$1))
....

That's nice.

So what do COUNTA(Data!$A:$A) and COUNTA(Data!$1:$1) evaluate to?

The only ways VLOOKUP returns #REF! errors is when its 3rd argument
evaluates to a number 1 + number of columns spanned by its 2nd
argument
OR
when the cell in the row matching its 1st argument in the column given
by
its 3rd argument just happens to evaluate to #REF!.










--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
VLOOKUP Problem Ross Excel Discussion (Misc queries) 1 June 20th 06 05:01 PM
VLOOKUP problem fastballfreddy Excel Worksheet Functions 3 May 16th 06 11:53 AM
VLookup Problem bwall Excel Discussion (Misc queries) 5 September 10th 05 12:15 AM
vlookup problem idcreek Excel Worksheet Functions 4 May 24th 05 01:07 PM
VLOOKUP problem Jason Excel Worksheet Functions 2 January 14th 05 10:39 PM


All times are GMT +1. The time now is 05:32 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"