+ Reply to Thread
Results 1 to 7 of 7

FORMULA HELP: nested if - based on criteria then return values from another column

  1. #1
    Registered User
    Join Date
    05-07-2018
    Location
    New Mexico, USA
    MS-Off Ver
    365
    Posts
    5

    FORMULA HELP: nested if - based on criteria then return values from another column

    I have 2 spreadsheets. One is the Master, the other is called Export. I need to get the numbers from the export into the master (column C) each month based on the item row name and the IDs in column A need to match. I kept trying: IF column B CONTAINS this, then pull in column T from other spreadsheet where column A matches on both spreadsheets (I was using index/match). I can't get it to work. I've attached an example of each sheet and the formula logic is on third tab (easier to read than below)

    2 spreadsheets
    Master
    Export

    If Column B in the Master contains this text "TTT RESV FEE- 3PH", then Return value from Export column N, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text " TTT RESV FEE- ABI", then Return value from Export column D, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT RESV FEE- CHI", then Return value from Export column D, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT RESV FEE- JAM", the Return value from Export column D, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT VOICE UPSCALE ", then Return value from Export column J, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT WEB-3PH", then Return value from Export column L, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT BOOKING FEE", then Return value from Export column B, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "TTT COMM", then Return value from Export column F, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "CONF", then Return value from Export column Q, where Column A matches in both, otherwise blank or 0
    If Column B in the Master contains this text "PMS", then Return value from Export column P, where Column A matches in both, otherwise blank or 0

    Thanks in advance!
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,945

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    None of your headings in EXPORT match (exactly) the criteria you are searching for in MASTER.

    If these matched, and assuing you need to match column headings AND row items in EXPORT, a relatively simple INDEX/MATCH/MATCH would probably work here
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    Based on what you have shared in post #1, try this:

    =INDEX(Export!B$2:Q$72,MATCH(A2,Export!A$2:A$72,0),LOOKUP(B2,{"CONF","PMS","TTT BOOKING FEE","TTT COMM","TTT RESV FEE- 3PH","TTT RESV FEE- ABI","TTT RESV FEE- CHI","TTT RESV FEE- JAM","TTT VOICE UPSCALE","TTT WEB-3PH"},{16,15,1,5,8,3,3,3,9,11}))

  4. #4
    Registered User
    Join Date
    05-07-2018
    Location
    New Mexico, USA
    MS-Off Ver
    365
    Posts
    5

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    Ford-They won't match exactly, it's mostly the endings that differ. That was why I was hoping to use "contains" . What do you think? if you don't think it could happen, what's your index/match/match solution?
    Last edited by Britniblock; 05-10-2018 at 03:40 PM.

  5. #5
    Registered User
    Join Date
    05-07-2018
    Location
    New Mexico, USA
    MS-Off Ver
    365
    Posts
    5

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    Hey 63falcondude! this is so close. THANK YOU. However not everything works and I can't figure out why, i.e. if you filter to column a on both sheets 62911 there are 2 #s missing that show up on export. It doesn't look as if exact match is an issue.
    One thing, I might could try and troubleshoot except can you tell me what these numbers at the end of the formula are doing?>>>> {16,15,1,5,8,3,3,9,11}

    Thanks again, this is the closest I've gotten!

  6. #6
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    {16,15,1,5,8,3,3,9,11}
    It represent no. column

    use at
    =index(array,row,column[here])

    you may use =Column() to get the column number.

  7. #7
    Forum Contributor
    Join Date
    03-22-2017
    Location
    Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    230

    Re: FORMULA HELP: nested if - based on criteria then return values from another column

    i try to split through first 4 with last 3 words and the remain with first 5 words.

    Unique
    3PH
    ABI
    CHI
    JAM
    TTT V
    TTT W
    TTT B
    TTT C
    CONF-
    PMS M

    it should be sufficient as a unique item.

    then use a normal index match with below and using left + right + if.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by BoredWorker; 05-11-2018 at 04:02 AM.
    Hope you can learn every time you visit here.

    If you still confuse on how it work, kindly ask or go to
    i) Formula - Formula (Ribbon) > Formula Auditing (Section) > Evaluate Formula > Evaluate; or
    ii) VBA/Code - Click F8 to see how it work step by step.

    It it take care of your question, Please:
    Mark tread as [Solved] [Thread Tools->Mark thread as Solved]
    ;and
    Click *Add Reputation to thank anyone solved your question.

+ 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. Replies: 3
    Last Post: 05-12-2018, 05:07 PM
  2. Return 3 values from column based on random value but with exlusion criteria
    By anxiolydiot in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 10-29-2015, 07:32 AM
  3. Formula to return values based on criteria and date range
    By jr217 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-28-2014, 06:20 AM
  4. Return column values based on criteria
    By SalientAnimal in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-11-2014, 10:55 AM
  5. Array formula to return multiple values based on various (OR) criteria
    By dancing-shadow in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2013, 05:12 AM
  6. [SOLVED] Formula to Return Bottom 3 Values From a Table Based on a Criteria
    By JungleJme in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 11-15-2012, 06:57 AM
  7. [SOLVED] Nested IF statement to return a value based on multiple criteria
    By harrydnyc in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-27-2011, 11:45 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