View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default totally lost - named range and vlookup

You have 2 questions.

1. A blank cell at the bottom of the range. You are starting in cell A2. As
a guess you have some text in cell A1? Assuming that to be true when you do
the
CountA(A:A)
you will count the text in cell A1 and end up with a rnage that is one row
too long. to fix it just subract 1 from the count...
=OFFSET(MasterContentsList!$A$2,0,0,COUNTA(MasterC ontentsList!$A:$A)-1,1)

2. Your vlookup returns #Ref. VLookup looks into a range of cells that is x
rows long by y columns wide. Your range is only 1 columbn wide, so when you
as it to return the second column over it fails. Change you range to be 3
columns wide.
=OFFSET(MasterContentsList!$A$2,0,0,COUNTA(MasterC ontentsList!$A:$A)-1,3)

--
HTH...

Jim Thomlinson


"< AVG Joe" wrote:

I have a sheet with a layout as such:
A B C
Bed 2.50 ea
Table 1.00 ea

I have tried to specify a dynamic named range ("ItemList" )as so:
=OFFSET(MasterContentsList!$A$2,0,0,COUNTA(MasterC ontentsList!$A:$A),1)

The range always includes an empty cell at the bottom of the list. I have
deleted everyting below to end, but no change? This is causing the DV list to
start at the bottom with a blank...

Secondly, when I try to use that named range in a VLOOKUP, to retrieve the
amount, I get a #REF error. Here is the formula I am using for VLOOKUP:
=IF(ISBLANK(B12),"",VLOOKUP(B12,ItemList,2,FALSE))
Are the errors related? What am I doing wrong