+ Reply to Thread
Results 1 to 19 of 19

IndexMatch Conditional Col #Ref Error

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

    Arrow IndexMatch Conditional Col #Ref Error

    Greetings,

    I thought I had this issue behind me, but I am unhappy with the huge array that Excel has to calculate whenever the sheet recalculates.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So I figure easy enough I will just move the dataSet closer to the formula & Excel should have less work to do, well it only works as long as I have a Col A ref for the index, if I change it to say AI where the data is now I get a #Ref error. When I breakdown each of the nested formulas to individual ones they work independently. Well that is untill I get to index & try to give it my new array starting in AI.
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    So I think the more relevant question from me is how would one do indexMatch with a conditional col ref to pass off to the index.

    TIA
    Last edited by dlow; 12-26-2014 at 06:00 PM.

  2. #2
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 V 2504
    Posts
    13,729

    Re: IndexMatch Conditional Col #Ref Error

    So I think the more relevant question from me is how would one do indexMatch with a conditional col ref to pass off to the index.

    TIA
    I'll hazard a guess and suggest the CHOOSE function.

    Perhaps an uploaded representative (sanitized) Excel file would help us to be more specific.
    Last edited by FlameRetired; 12-26-2014 at 06:11 PM.

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

    Re: IndexMatch Conditional Col #Ref Error

    I was thinking about trying choose & forgot all about it. Thanks for reminding me I am gonna try that right now.

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

    Re: IndexMatch Conditional Col #Ref Error

    I havent had much practice with the choose function & having a hard time figuring this out. How would I use choose to feed the appropriate col to index. This is what I came-up with but I dont think I am doing it right. It gives me Col 63s & then Blanks instead of the other Col
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I will see if I can gut this thing & make a sample workBook.

    Update_I. to this post:

    I created a thread just for the choose question I am asking heres a link to it.



    Update_II. to this post: Still cleaning-out this workBook to give a sample I hope to be done soon.
    Last edited by dlow; 12-26-2014 at 10:44 PM.

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

    Re: IndexMatch Conditional Col #Ref Error

    Sadly I have made no headway on this heres the SampleDataSet: SmallerArray.xlsx TIA
    Last edited by dlow; 12-29-2014 at 11:09 PM.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,333

    Re: IndexMatch Conditional Col #Ref Error

    Hi dlow,

    I see your sample workbook and have no idea what problem you are trying to solve. What is the expected outcome?
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

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

    Re: IndexMatch Conditional Col #Ref Error

    Hi MarvinP,
    In AS3 is a comment, but I would like to make the array smaller, but when I do I get #Ref Error. if I change my Index Array to AH from A thats when I get the error. I hope I explained it well enough for you to help me. I would like to say thanks to you anyway I have read a lot of your solutions. The expected out come would be like all the other cells below AS3 which still have the "A" Array. Oh one more thing AS & BH kinda work with eachother, so maybe BH would be the 1st one I should be looking @ They are almost the same formulas. Sorry Im a mess.

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

    Re: IndexMatch Conditional Col #Ref Error

    The simplest way I can think of to describe what I am trying to do is echo back the cell addresses of a list of values in AT & BI. My thought process was that if I knew the row I would just have to find the Col. The row is the date & the Col is whichever of the two that isnt blank.

    SideNote:[lol this was the easiest way I could think of to do it, lolz.... Im sure its not the best way. lol I recently looked @ some VBA I wrote a year or two ago & it was over 50 line of code. I crushed it the other day with under 20 lines laughing @ myself for making life so difficult on myself back & then & still now, lol.]

  9. #9
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,333

    Re: IndexMatch Conditional Col #Ref Error

    Without knowing what the final result might be, I run the Formula Evaluate dialog. I see that the next to last Column(AZ3) is giving you this problem. I've stepped through the Evaluate a few times and have no idea what the final answer or goal might be.

    My question is, could a Pivot Table or Advanced Filter or other built in function help getting you the address or answers you need, without needing a long formula. Without understanding what these point to, I'm still in the dark.

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

    Re: IndexMatch Conditional Col #Ref Error

    I already have a formula that works, but I want to change it, when I do it breaks it. AS3 has the broken formula, but AS4 & down has the working formulas. What I am doing to break it is changing the array AS3 from A to AH that breaks it, yeah I see that Index doesnt like my conditional colRefs & thats where its erroring out & thats what I would like to fix. I was hoping that choose would help but I cant even get that working. So I was just reiterating on the off chance that might have made it a bit clearer if not no worries thanks for your help MarvinP & FlameRetired I gave each of you some RepPoints.

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

    Re: IndexMatch Conditional Col #Ref Error

    I am open to any thing that leaves the data in place so a pivot table wouldnt do it, sorting I dont see how that would help I could be to close to the problem to be seeing this intelligently, maybe some sleep will help. Always open to another formula or build-in function.

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: IndexMatch Conditional Col #Ref Error

    I'm confused, but does this help??

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  13. #13
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,712

    Re: IndexMatch Conditional Col #Ref Error

    The reason you get a #REF! error when you change the formula is that the column reference within INDEX is larger than the number of columns in the [changed] array. For example if you use this formula

    =INDEX(D1:J1,1,9)

    ....you will get an error because 9 is a larger number than the number of columns in D1:J1 (7). You are doing the same here, COLUMN(AZ3)=52 and COLUMN(BO3)=67 but the array used in INDEX is AH$3:$BO$202 which has only 34 columns. The column references are not absolute but relative to the array.

    Given that you have the required row number in column AX couldn't you just use that rather than using MATCH to find it again, e.g. this formula in AS3 copied down

    =IF(AR3<>"",CELL("address",IF(INDEX($AZ:$AZ,AX3)<>"",INDEX($AZ:$AZ,AX3),INDEX($BO:$BO,AX3))))
    Audere est facere

  14. #14
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: IndexMatch Conditional Col #Ref Error

    use
    =IF(AR3<>"",CELL("address",INDEX(AH$3:$BO$202,MATCH(AR3,$AH$3:$AH$202,0),IF(INDIRECT(ADDRESS(AX3,COLUMN(AZ3)))<>"",COLUMN(AZ3)-COLUMN(AH3)+1,COLUMN(BO3)-COLUMN(AH3)+1))),"")

    instead of =IF(AR3<>"",CELL("address",INDEX(AH$3:$BO$202,MATCH(AR3,$AH$3:$AH$202,0),IF(INDIRECT(ADDRESS(AX3,COLUMN(AZ3)))<>"",COLUMN(AZ3),COLUMN(BO3)))),"")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

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

    Re: IndexMatch Conditional Col #Ref Error

    Wow!!! Thx so much folks. I am whelmed with the outpouring of information & support. I just woke-up I have to read them all & test I will get back & update ASAP. Wholly Molly; THANKS SO MUCH!!!

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

    Re: IndexMatch Conditional Col #Ref Error

    That was pretty quick; & many thx again to everyone.
    The results are of course that you guys solved this & in more than one way.

    Glenn Kennedy, sadly your solution didnt work 100% it did fix half the Cols, but not the other which I am sure if we thought about it enough we would figure a way to skin that cat I still gave you a RepPoint tho for taking a stab @ it for me & again I thank you. +1RepPoint

    daddylonglegs it goes without saying that you solved it, you’re a master & I would personally like to thank you for all of your efforts. I have learned a lot from all that you do.[Done fawning [for now]] But seriously words cant express the gratitude & appreciation I have for you & this community. +2RepPoints

    nflsales you also solved this & in a very clever way. I will have to look @ this more once I finish my 1st cup of coffee. I am very grateful for your solution too. +2RepPoints


    Thanks again everybody this is Solved & I am making it so.

  17. #17
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,941

    Re: IndexMatch Conditional Col #Ref Error

    thanks for your feedback and reputation

  18. #18
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,333

    Re: IndexMatch Conditional Col #Ref Error

    Wow - I still don't have any idea what a "fixed" answer would look like. I did understand DLL's explanation of the last argument being greater than the range of cells giving the bad Ref answer. I'm going to pass next time on questions where I need ask more than once for the type of question this is problem is solving.

    I'm very glad you learned something from all the help. I've learned something too.

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

    Re: IndexMatch Conditional Col #Ref Error

    Wooooooow...... what a reduction in overhead @ daddylonglegs absolutely brilliant, so much so it saved me from having to move the data around, too avoid having the arrays process several irrelevant Cols ect, ect... Also thanks for the very thorough explanation of what I was doing wrong

+ 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] Need Help with an IndexMatch
    By JPW in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 07:05 AM
  2. [SOLVED] Need Help with an IndexMatch
    By JPW in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 06:05 AM
  3. [SOLVED] Need Help with an IndexMatch
    By JPW in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-06-2005, 04:05 AM
  4. Need Help with an IndexMatch
    By Jebaneesa in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] Need Help with an IndexMatch
    By Jebaneesa in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 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