View Single Post
  #16   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Chad F[_2_] Chad F[_2_] is offline
external usenet poster
 
Posts: 18
Default Multiple Item Lookup

Max,

Thanks for all of your help! I'm almost there, but I need a little more
assistance please.

I now have the single ("803") working, the double ("804" and "805") working,
but the range does not seem to be working exactly right. I did have to use
the "+0" to get it to work so far.

Here is what I am seeing starting at A1:

#VALUE (Cell A1)
(A2:A438 are blank)
103000 (Cell A439)
103005
103010
104000
104005
etc.
705980 (Cell A1837)

Moving to B1, I am trying to shrink the list and get rid of the gaps, but
here is what I am seeing:

#VALUE (B1:B1399)


Here are the formulas that I have right now:

(A1)
=IF(Import!C1="","",IF(AND(Import!C1+0=103000,Imp ort!C1+0<=705999),Import!C1+ROW()/10^10,""))

(B1)
=IF(ROW()COUNT(A:A),"",INDEX(Import!C:C,MATCH(SMA LL(A:A,ROW()),A:A,0)))

Have I done something wrong? Please look it over and let me know.

Thanks,
Chad

"Max" wrote:

"Chad F" wrote:
Max, This worked great! Thank you!


Welcome, pl press the YES button (like the one below) in that response

To handle each of the 2 scenarios, you just need to tweak the criteria
formula in A1 to suit, then copy A1 down. No need to change the formulas in
col B.

..pull in all items that start with 804 AND all items that start with 805

=IF(Sheet1!A1="","",IF(OR(LEFT(Sheet1!A1,3)="803", LEFT(Sheet1!A1,3)="804"),Sheet1!A1+ROW()/10^10,""))

pull in .. all items between the range 103000 thru 705999**

=IF(Sheet1!A1="","",IF(AND(Sheet1!A1=103000,Sheet 1!A1=705999),Sheet1!A1+ROW()/10^10,""))

**assuming source data are real nums

If source data could contain mixed text nums and real nums,
use a "+0" to coerce it, viz:
=IF(Sheet1!A1="","",IF(AND(Sheet1!A1+0=103000,She et1!A1+0<=705999),Sheet1!A1+ROW()/10^10,""))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:22,000 Files:370 Subscribers:66
xdemechanik
---