+ Reply to Thread
Results 1 to 7 of 7

If statements for multiple cells

  1. #1
    Registered User
    Join Date
    03-30-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    51

    If statements for multiple cells

    Suppose I have 5 names.

    Alex
    Becky
    Cedric
    Darlene
    Eric

    Suppose each of these folks have an order that I have to deliver to and some are VIP's. For example, Darlene will always get her package first before Alex.

    1 Darlene
    2 Cedric
    3 Alex
    4 Eric
    5 Becky

    What I am looking for is a formula that will look at the list of names and perform logic such that if the primary name is present in the list, it will return that name. If that name is not on the list, it will return the next name.

    So if the list of names were

    Alex
    Eric
    Eric
    Eric [he has multiple deliveries, let's say]
    Darlene

    The formula would come back with "Darlene".

  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,690

    Re: If statements for multiple cells

    Look into vlookup or index/match. To get a better formula mock up an example and upload it - go advanced to upload one.
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: If statements for multiple cells

    Where D is your second table and C is your first
    =MIN(MATCH(D1:D5,C1:C5,0))
    Array formula, use Ctrl-Shift-Enter
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    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,690

    Re: If statements for multiple cells

    Here you go DukeR, I mocked up an example for you...

    using index/match against a list I created in E:F and the people beginning in A2 =INDEX($E$2:$E$6,MATCH(A2,$F$2:$F$6,0)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-30-2016
    Location
    USA
    MS-Off Ver
    2016
    Posts
    51

    Re: If statements for multiple cells

    You guys are the best! Thank you.

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,080

    Re: If statements for multiple cells

    Ignore this post.

  7. #7
    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,690

    Re: If statements for multiple cells

    you're welcome and if that takes care of your issue don't forget to mark the post as solved using the thread tools dropdown at the top of the post.

+ 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] Multiple If statements with multiple then statements pulling from Index/Match commands
    By Reggie Wells in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-30-2017, 03:25 PM
  2. [SOLVED] Multiple If Statements if Cells are Blank
    By SlimPickens in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-04-2017, 12:22 PM
  3. Nest If Statements Dependent on Multiple Cells
    By shanafesta in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-22-2015, 12:12 AM
  4. Multiple IF THEN ELSE statements from two cells
    By wizzard21 in forum Excel General
    Replies: 4
    Last Post: 07-20-2014, 01:30 PM
  5. Replies: 0
    Last Post: 09-04-2009, 07:58 AM
  6. Add multiple IF statements to a combined string of cells
    By littledobby in forum Excel General
    Replies: 1
    Last Post: 07-17-2008, 11:31 PM
  7. Multiple IF statements and conditional locking of cells
    By MrSandman in forum Excel General
    Replies: 3
    Last Post: 02-08-2008, 01:26 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