+ Reply to Thread
Results 1 to 12 of 12

Holy Moley, IF AND INDEX MATCH LEFT confusion

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Holy Moley, IF AND INDEX MATCH LEFT confusion

    Man, the logic of this is killing me trying to keep it all straight.

    How can I do the following

    I need to look in column G on TABLE sheet
    If the value is 2 and
    the left 11 characters of column C = "701-000021-" then
    on REPORT sheet return "X" otherwise ""
    Attached Files Attached Files

  2. #2
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    are you wanting Option numbers also attached to the if then stmt too?
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.95 for Mac MS 365
    Posts
    8,682

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Otherwise I'd think this would work for you... =IF(AND(table!G2=2,LEFT(table!C2,11)="701-000021-"),"X","")

  4. #4
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    I'm not looking at cell C2 alone. I'm looking at the whole columns. I updated the spreadsheet attachment.

    I was trying to use a lookup because I need to look in the whole column for the values. Sometimes I will use "X" as the return, but in other cells I will need to get the result from column C.

    I can't use a negative number on a lookup so I was trying to use an INDEX MATCH combination.

    On REPORT sheet in cell B3 I need to know if there is a gauge being used for option 2.
    First I need to look at TABLE sheet column G to find option 2
    For all the option 2 I need to see if there is any that begins with "701-000021-"
    If there is then I will put an "X".

    On other cells, I will be looking for a different number in column C of TABLE sheet.
    If that number exists then I need to put that value in C3 on REPORT sheet.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Here's what I tried without success (not using the LEFT function):

    =IF(AND(INDEX('TABLE'!C:C,MATCH("701-000021-103",'TABLE'!C:C)),INDEX('TABLE'!C:C,MATCH("2",'TABLE'!G:G))),"X","")

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Try this....
    In B2
    Please Login or Register  to view this content.
    and then copy down.
    Is this what you are trying to achieve?
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  7. #7
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    It sort of looks right in that it puts an X in the right row. When I copy it down to row 9 it puts another X. A9 doesn't have anything to reference so I'm not sure what it is looking at to think there should be an X here.

  8. #8
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Sorry. That's my mistake. Didn't use the absolute reference. The correct formula would be like this......
    In B2
    Please Login or Register  to view this content.
    Does that work now?

  9. #9
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Yes, that looks very nice. Thank you.

    Now for the million dollar question...
    When it does find a match, how do I put the value of the match in place of "X"?

  10. #10
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    What value you want to return in case of a match? If this is Part in col. C from Table sheet, try this.....
    In B2
    Please Login or Register  to view this content.
    and then drag down.

  11. #11
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    Exactly right!

    Thanks

  12. #12
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,655

    Re: Holy Moley, IF AND INDEX MATCH LEFT confusion

    You're welcome. Thanks for the feedback.

+ 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] Left Function in Combination with IF, LOOKUP, MATCH, or INDEX?
    By superwhoever in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 10-29-2012, 01:31 AM
  2. Index, Match, Left & or Replace needs refining
    By julhs in forum Excel General
    Replies: 4
    Last Post: 01-31-2012, 08:03 PM
  3. using LEFT, MID, RIGHT with INDEX, MATCH?
    By tom_19 in forum Excel General
    Replies: 2
    Last Post: 09-26-2011, 09:16 PM
  4. Replies: 2
    Last Post: 10-23-2010, 04:54 PM
  5. use index, match and left in the same formula
    By jahardy in forum Excel General
    Replies: 4
    Last Post: 08-21-2009, 04:09 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