+ Reply to Thread
Results 1 to 17 of 17

Column Return Instead of Row with INDEX,SMALL,IF

  1. #1
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Column Return Instead of Row with INDEX,SMALL,IF

    Hi

    I'm new to the Forum. For the most part I muddle by with Excel but I have definitely hit a brick wall and can't find a particular solution to my problem anywhere. So I've come to ask the more knowledgable people for an answer.

    I have a very nice INDEX SMALL IF Function in my sheet that Checks two columns A and B with 380 rows for instances of a word in a cell and returns the value of another column C when that instance occurrs in that row, which is the following:

    =INDEX($B$3:$D$382,SMALL(IF($C$3:$D$382=$Q$5,ROW($C$3:$D$382)),ROW(1:1))-2,1)

    This repeats over 38 rows (as there will be 38 instances out of 380) with the second ROW function increasing 2:2, 3:3 etc. each time.

    I am stumped at what to do now.

    I need to figure out how, in a separate cell, to check the same rows and columns for the same instance of the word yet instead of returning the value of another column as before I need it to know which column it is in either A or B and not a corresponding cell value in column C.

    I have tried all manner of COLUMN permutations instead of ROWS but I am now at a complete brick wall.

    Any help would be massively appreciated.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Post a SMALL sample file that shows us what results you expect.

    A SMALL file will have about 20 rows worth of data.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    HI Thanks.

    Have attached a sample. The Area highlighted in yellow is the column that needs to reflect whether that team played away or home (i.e. which column did the team name occur in; column C or Column D).

    Small Example.xlsx

    Hope this makes a bit more sense?

    Cheers

  4. #4
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Instead of ROW(1:1))-2 you can try ROWS($C$3:C3)).
    <----- If you were helped by my posts you can say "Thank you" by clicking the star symbol down to the left

    If the problem is solved, finish of the thread by clicking SOLVED under Thread Tools
    I don't wish to leave you with no answer, yet I sometimes miss posts. If you feel I forgot you, remind me with a PM or just bump the thread.

  5. #5
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    A few more adjustments here. If you only get values from the first column there is no need to give INDEX the full range.
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Instead of ROW(1:1))-2 you can try ROWS($C$3:C3)).

    Sorry Jacc. Thanks for the swift reply but it still only retrieves the corresponding date and not the column that the name appears in.

    CB

  7. #7
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Not a very solid solution but I think this is correct.
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Sorry, that was far from correct.

  9. #9
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    I'm sure its something to do with returning the column number with COLUMN() instead of referencing the value in column B from the corresponding row. but not sure how to translate that into the proper syntax.

  10. #10
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Here is something more sturdy. And correct I hope.
    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Edit: Ironically it works without the COLUMN function.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Hi Jacc

    That is working almost perfectly! Brilliant. One tiny problem is that the Home Team / Away Team returns are reversed. I'm trying to think of the section to correct this but still drawing a blank.

    Great work though. Thank you.

    CB

  12. #12
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Good to hear it works!
    Not sure I understand your last problem. Just swap the contents of cells C1 and D1 or what do you mean?

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    maybe this
    Attached Files Attached Files
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  14. #14
    Registered User
    Join Date
    04-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Ignore me I was putting it in the wrong team column. Fixed. Solved, Excellent!

    Many thanks for your help, Jacc

  15. #15
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF


    --------

  16. #16
    Forum Expert
    Join Date
    09-01-2012
    Location
    Norway
    MS-Off Ver
    Office 365
    Posts
    2,886

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    Good one, Martin!
    I tried a similar approach first but couldn't get it right.

  17. #17
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Column Return Instead of Row with INDEX,SMALL,IF

    I guess I'm no longer needed here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Dependent Dropdown List Using Index and Small Won't Return Multiple Values
    By ebevis in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-23-2013, 02:28 AM
  2. Replies: 4
    Last Post: 03-13-2013, 12:38 PM
  3. return multiple matches using INDEX and SMALL
    By merlyn45 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-31-2013, 05:14 AM
  4. Using Index & Small to return multiple values
    By BHudPE in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-17-2010, 06:06 AM
  5. Index Row and return data in a Single Column:No return
    By Domenic in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 04:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1