View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Steve Steve is offline
external usenet poster
 
Posts: 1,814
Default Vlookup of specific text, then in consecutive rows

Very nice. 95% there.
I'm only getting #'s up to 9 in the A column, and also the corresponding 9
names in B2:B10, so that part is working great.
However, I should have 22 incidents of relief instead of only 9. The reliefs
might be in any row from Mastertab!O21:O923
Also, I'm dragging A and B on the fresh sheet to row 904, because that's
where I'm getting the max ref to the row in the master tab where relief might
be. The formula in cell A904 refs mastertab!O923.
Also, the $'s in the B column formula are showing $BB$21 in cell B904. Could
$BB$21 in cell B904 be causing the problem, meaning should it have been
dragged without the $ ?

Yes, Excel 2003

Thanks again,

Steve

"zvkmpw" wrote:

The extra explanation clarifies things a bit, but the posted formulas
still work for me, if I understand the problem correctly. Could there
be typos?

Below is a slightly simplified version starting from a fresh sheet.

In the fresh sheet put this in A2:
=IF(ISERROR(FIND("relief",MasterTab!O21)),"",MAX(A $1:A1)+1)
and this in B2:
=IF(ROW()-1MAX(A:A),"",
OFFSET(MasterTab!$BB$21,MATCH(ROW()-1,A:A,0)-2,0))
then select A2:B2 and copy down to row 73.

Column B should contain the desired list. Column A is a helper column,
and can be hidden.

With your latest data, I get 1 in A17 and 2 in A39, corresponding to
the rows in MasterTab!O21:O92 containing the word "relief" somewhere
in the text. The rest of column A is blank. Then, B2 reports what's in
MasterTab!BB36 and B3 reports what's in MasterTab!BB58. The rest of
column B is blank.

If it's still not working, there's a way to see step-by-step how Excel
is evaluating a formula. Select the cell containing a formula and use:
Tools Formula Auditing Evaluate formula
This might give a clue how to correct a formula.

(I have Excel 2003.)
.