Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Herbert Seidenberg
 
Posts: n/a
Default lookup

Arrange your data and headers as shown:
p_n desc price Au Bu Cu Du
23 valve 1.00 1 1 0 1
32 pump 2.50 0 1 1 2
3 plc 6.75 1 1 1 0
45sd sw 9.00 0 0 1 1

select
Du
p_n desc price qty rsel set2
32 pump 2.50 2 2 1
23 valve 1.00 1 1 2
45sd sw 9.00 1 4 3
4

Select the data under p_n, desc and price (12 cells) in the first
array and
Insert Name Define array1
Select the data under Au, Bu, Cu, Du (16 cells) and name it array2
Select the Au...Du header and its data (20 cells) and
Insert Name Create Top Row
Repeat for the 2 cells (select, Du), the 5 cells (rsel,2,1,4,blank) and
(set2,1,2,3,4)
Extend the series of numbers of set2 to equal the number of parts (n).
Create an array the size of array2 and fill it with
=(RAND()-0.5)/100+1
Copy Paste Paste Special Value, Multiply to array2.
Redo after updates.
Enter this formula into rsel and copy down n times:
=IF(set2COUNTIF(INDIRECT(select),"0"),"",
MATCH(LARGE(INDIRECT(select),set2),INDIRECT(select ),0))
In the results array, under p_n, desc, price (12 cells) enter
=IF(rsel="","",INDEX(array1,rsel,))
Under qty, enter and copy down n times
=IF(rsel="","",ROUND(INDEX(INDIRECT(select),rsel), 0))
Under select, change Du to another unit as you please.

 
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
Another way to lookup data David Vollmer Excel Worksheet Functions 1 September 23rd 05 05:16 AM
lookup more than one cell andrewm Excel Worksheet Functions 20 June 14th 05 05:33 AM
Lookup Vector > Lookup Value Alec Kolundzic Excel Worksheet Functions 6 June 10th 05 02:14 PM
Lookup function w/Text and Year Josh O. Excel Worksheet Functions 1 February 12th 05 11:27 PM
double lookup, nest, or macro? Josef.angel Excel Worksheet Functions 1 October 29th 04 09:50 AM


All times are GMT +1. The time now is 02:29 AM.

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"