+ Reply to Thread
Results 1 to 4 of 4

Wrapping an if function around an Index/Match function - need help ;)

  1. #1
    Registered User
    Join Date
    01-15-2015
    Location
    california
    MS-Off Ver
    Newest
    Posts
    23

    Wrapping an if function around an Index/Match function - need help ;)

    Hi guys, this is my first post on the forums! I have a complicated problem that I need help with. I developed a tool for my work to automate the process of hiring employees.

    I currently have this working forumla in cell G7:

    INDEX(R9:R6404,MATCH(1,(W9:W6404=G4)*(Q9:Q6404=D6),0))

    This index function looks through a massive list of data to return a single value (job code) if it meets 2 criteria: If G4 - Job title and D6 - city both match the values that are already in cells G4 and D6, it returns the corresponding value of job code (a value listed in the same row of the database, in a different column). For instance, an employee in San Diego, CA with the job title of Electrician 1 will have a specific job code that is different than if he was an Electrician 1 in a different city, such as New York.

    Make sense so far?

    The problem is that if there are no employees with that particular job title and location, the index/match function will return nothing (a blank cell).
    I need help with this part:
    If the function returns nothing, I need to imbed another function to be run after the index/match function returns a blank that re-runs the process, but instead of looking at cells G4 (job title) and D6 (city), I need the forumla to look at G4 (Job title) and E6 (State).

    Is it possible to have this happen? I'm really bad with embedding!
    Thanks in advance.

  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: Wrapping an if function around an Index/Match function - need help ;)

    Quote Originally Posted by tonyridino View Post

    The problem is that if there are no employees with that particular job title and location, the index/match function will return nothing (a blank cell).
    If the criteria are not met the formula should return a #N/A error.

    You could try something like this...

    =IF(INDEX(R9:R6404,MATCH(1,(W9:W6404=G4)*(Q9:Q6404=D6),0))="",INDEX(R9:R6404,MATCH(1,(W9:W6404=G4)*(Q9:Q6404=E6),0)),INDEX(R9:R6404,MATCH(1,(W9:W6404=G4)*(Q9:Q6404=D6),0)))

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    01-15-2015
    Location
    california
    MS-Off Ver
    Newest
    Posts
    23

    Re: Wrapping an if function around an Index/Match function - need help ;)

    Hi Bill,
    Thanks for that!

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

    Re: Wrapping an if function around an Index/Match function - need help ;)

    You're welcome!

+ 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. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  2. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  3. nested MATCH function within the INDEX function
    By thechoosenonesdream in forum Excel General
    Replies: 4
    Last Post: 10-25-2012, 03:55 PM
  4. Replies: 2
    Last Post: 03-20-2009, 01:29 PM
  5. [SOLVED] Emulate Index/Match combo function w/ VBA custom function
    By Spencer Hutton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-02-2005, 01:06 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