Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I was following the instructions on http://office.microsoft.com/en-us/ex...260381033.aspx
to return all the values that match a corresponding lookup value in a table and I have gotten it working using their steps. The problem I'm having is I need the formula to work when I fill it across the colums instead of down the rows. I want the returned results to appear on the same row horizonatally next to the lookup number instead of in several rows beside it. I've been playing with the formula but I cant seem to get it to cooperate. Anyone have any ideas. =IF(ISERROR(INDEX(Sheet2!$C$2:$D$2934,SMALL(IF(She et2!$C$2:$C$2934=$C $2,ROW(Sheet2!$C$2:$C$2934)),ROW(1:1)),2)),"",INDE X(Sheet2!$C$2:$D $2934,SMALL(IF(Sheet2!$C$2:$C$2934=$C$2,ROW(Sheet2 !$C$2:$C $2934)),ROW(1:1)),2)) |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Since you are extracting values from D2:D2934 there is no need to include C
in the index part then add 2 for the D column, also you need to offset the INDEX part since row() will always count from the first row but if you change INDEX to start in D1 instead it will work, something like this =IF(ISERROR(INDEX(Sheet2!$D$1:$D$2934,SMALL(IF(She et2!$C$2:$C$2934=$C$2,ROW(Sheet2!$C$2:$C$2934)),CO LUMN(A:A)))),"",INDEX(Sheet2!$D$1:$D$2934,SMALL(IF (Sheet2!$C$2:$C$2934=$C$2,ROW(Sheet2!$C$2:$C$2934) ),COLUMN(A:A)))) note that it is not the best formula you can use for this, there are better faster and more robust ways to get this -- Regards, Peo Sjoblom wrote in message oups.com... I was following the instructions on http://office.microsoft.com/en-us/ex...260381033.aspx to return all the values that match a corresponding lookup value in a table and I have gotten it working using their steps. The problem I'm having is I need the formula to work when I fill it across the colums instead of down the rows. I want the returned results to appear on the same row horizonatally next to the lookup number instead of in several rows beside it. I've been playing with the formula but I cant seem to get it to cooperate. Anyone have any ideas. =IF(ISERROR(INDEX(Sheet2!$C$2:$D$2934,SMALL(IF(She et2!$C$2:$C$2934=$C $2,ROW(Sheet2!$C$2:$C$2934)),ROW(1:1)),2)),"",INDE X(Sheet2!$C$2:$D $2934,SMALL(IF(Sheet2!$C$2:$C$2934=$C$2,ROW(Sheet2 !$C$2:$C $2934)),ROW(1:1)),2)) |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks doing it like that appears to work. Any tips on a better way
to do it. I was just going off that micorosft example. -Nick |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
This formula is more robust, also entered with ctrl + shift & enter
=IF(COLUMNS($B1:B1)<=COUNTIF(Sheet2!$C$2:$C$2934,$ C$2),INDEX(Sheet2!$D$1:$D$2934,SMALL(IF(Sheet2!$C$ 2:$C$2934=$C$2,ROW(Sheet2!$C$2:$C$2934)-COLUMN(Sheet2!$C$2)+3),COLUMNS($B1:B1))),"") test them side by side then select column A in the same sheet that holds the formulas and insert a new column, every time you insert a new column the first formula will change the result and eventually there will just be blank cells returned while the above formula still returns the correct result, also it has less function calls so it should be faster -- Regards, Peo Sjoblom wrote in message oups.com... Thanks doing it like that appears to work. Any tips on a better way to do it. I was just going off that micorosft example. -Nick |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
index match array function-returning only first match, need last. | Excel Worksheet Functions | |||
two table lookup match | Excel Discussion (Misc queries) | |||
table, index, array, match, lookup? | Excel Worksheet Functions | |||
Excel 2002 Lookup formula returning wrong results? | Excel Worksheet Functions | |||
Returning row # using match or index of repeated text in a complex table | Excel Worksheet Functions |