View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default IF Formula to go through every line of array

Hi!

(i.e. "Casual", Column D = 23 - Column E = 40


Assuming this is the layout:

......C...................D...............E
Casual................23..............40
Formal...............41..............58
Liesure...............59..............76

items numbered 1 through 5000


Are in the range A1:An

Enter this formula in B1 as an array using the key combo of
CTRL,SHIFT,ENTER:

=INDEX(C$1:C$3,MATCH(1,(A1=D$1:D$3)*(A1<=E$1:E$3) ,0))

Copy down as needed.

Add your sheet names and adjust the ranges to suit.

Biff

"Leibtek" wrote in
message ...

Hi,

I have a worksheet with items numbered 1 through 5000, I have another
worksheet with the item categories. The categorie's worksheet has to
columns that indicate the range of items belonging to that category
(i.e. "Casual", Column D = 23 - Column E = 40 [Casual belongs to items
numbered 23-40]).

How do I get the category name in the item worksheet in its
corresponding items?

I've tried vlookup, if..etc. looks like I need a combination of both..
If somone can please help..

Thanks,
Leibtek


--
Leibtek
------------------------------------------------------------------------
Leibtek's Profile:
http://www.excelforum.com/member.php...o&userid=32287
View this thread: http://www.excelforum.com/showthread...hreadid=520424