+ Reply to Thread
Results 1 to 8 of 8

IndexColumn Help

  1. #1
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Red face IndexColumn Help

    Hi,

    I know what row the data that I want is in, but it could be in 1 of 2 non-contiguous columns. I was thinking I could use IndexMatch, but when I tried to do it & make the column conditional with an ifStatement I get a #Ref so I must be doing it wrong. How would you guys do it.

    Heres my lame formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    What I am trying to do is look in the known Row & if Col CK has a value use CK as the Col Ref if not Col CM has it.


    As always TIA
    Update:

    I am still trying to do all of the above, but my problem isn’t the condition that I’m giving Excel my Col, because if I hardCoded it with an integer like 4 I still get #Ref, so I just don’t know how to do Index using a Col Ref. I will check with Google thx guys
    Last edited by dlow; 12-10-2014 at 07:00 PM.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Conditional Column help

    Please Login or Register  to view this content.
    Ben Van Johnson

  3. #3
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Re: Conditional Column help

    Hi thx for the quick reply, sadly I am still getting #Ref[even with CAE[CntlAltEnter]], so I am going to make a sample workbook to make it easier for you guys to help me out. I am hoping that in just doing that I might realize the error of my ways.

    Thx again for the help protonLeah

  4. #4
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Re: Conditional Column help

    Heres a workBook thx again.

    FindMe.xlsb

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

    Re: Conditional Column help

    you need the whole range for the index since your formula is looking for row and column
    =INDEX(A3:F201,MATCH(A3,A3:A201,0),IF(D3<>"",COLUMN(D3),COLUMN(F3)))
    red bit is row green bit column
    "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

  6. #6
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Re: Conditional Column help



    Like magic thx martindwilson & protonLeah +1 Rep for you both. This is Solved
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,617

    Re: Conditional Column help

    Sorry I did not notice the problems with your formula.
    In the Index, you have a single cell, BP3, where an array is required.

    Unfortunately, the workbook you posted does not correspond to the original posted formula. Also, in the workbook the formula in H3 is trying to match a date in A3 "12/05/2014" with dates below, but the latest date is "12/04/2014", so there can be no match. If there were, the formula for the posted worksheet might look like (if the index array includes column A):
    Please Login or Register  to view this content.
    or maybe this, if the data is only returned from columns D or F:
    Please Login or Register  to view this content.
    But, you will have to post a more accurate sample workbook.

  8. #8
    Forum Contributor dlow's Avatar
    Join Date
    08-12-2013
    Location
    EveryWhere
    MS-Off Ver
    Excel 2007, 2010
    Posts
    275

    Re: Conditional Column help

    Nothing to apologize about I appreciate your time & I used your condition in my final formula.
    Sorry my sample workbook wasn’t on point. Yeah I was just about to update my post & change the title realizing that the problem was that I didn’t know how to do index with a Col Ref.
    Thx for the additional insights.

    Update:
    lol @ myself; yeah, what you guys said: the "Array" I got my brain wrapped around it now. Thx again.
    Fin Formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by dlow; 12-11-2014 at 02:45 AM.

+ 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] Conditional Formatting To Reference a String in a Column and Applied to another Column
    By ABC2014 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-21-2014, 08:25 PM
  2. Replies: 0
    Last Post: 11-20-2013, 11:28 AM
  3. Conditional Format an Entire Column based on percentage of another Column
    By Nolson24 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-29-2013, 09:23 AM
  4. [SOLVED] Find maximum value in conditional range (conditional on the name on another column)
    By gjrr4x1 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-26-2013, 06:51 AM
  5. Replies: 5
    Last Post: 09-24-2012, 05:14 PM

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