+ Reply to Thread
Results 1 to 8 of 8

If and CountIf formula assistance

  1. #1
    Registered User
    Join Date
    02-09-2017
    Location
    Southern California, USA
    MS-Off Ver
    2016
    Posts
    24

    If and CountIf formula assistance

    I am struggling with composing a formula that will take the condition in one cell (e.g., "YES") and then proceed with performing a lookup and where a match is found, return a branch store name. As an example, I have two worksheets in the workbook, with one worksheet (Detail) contains all my detailed information and the second worksheet (Branches) only contains the Branch Number, Branch Name and Branch Address.
    In the Detailed worksheet I would like cell AB5 to look at AA5 and if that cell is populated with a "YES", then search the Branches worksheet cells A2:A266 and compare the results to cell C5 (Branch Number) in "Detailed" worksheet and where a match is found return the name of the branch from cells C2:C266 of the "Branches" worksheet.

    Thank you for your assistance

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

    Re: If and CountIf formula assistance

    Hi, welcome to the forum

    To best describe or illustrate your problem you would be better off attaching a dummy workbook. The workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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
    Registered User
    Join Date
    02-09-2017
    Location
    Southern California, USA
    MS-Off Ver
    2016
    Posts
    24

    Re: If and CountIf formula assistance

    I have attached a sample workbook to make it easier for those providing guidance.

  4. #4
    Forum Moderator
    Join Date
    01-21-2014
    Location
    St. Joseph, Illinois U.S.A.
    MS-Off Ver
    Office 365 v 2403
    Posts
    13,406

    Re: If and CountIf formula assistance

    Quote Originally Posted by raider573 View Post
    I have attached a sample workbook to make it easier for those providing guidance.
    I don't see it.
    Dave

  5. #5
    Registered User
    Join Date
    02-09-2017
    Location
    Southern California, USA
    MS-Off Ver
    2016
    Posts
    24

    Re: If and CountIf formula assistance

    My apologies the original file had an issue and was too large to transmit, the attached is the correct sample workbook.
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: If and CountIf formula assistance

    Try

    =IFERROR(IF($G5="YES",VLOOKUP($C5,'Branch Names'!$A$2:$E$266,3,0),""),"")

  7. #7
    Registered User
    Join Date
    02-09-2017
    Location
    Southern California, USA
    MS-Off Ver
    2016
    Posts
    24

    Re: If and CountIf formula assistance

    Thank you as the formula you provided worked, much appreciated

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,199

    Re: If and CountIf formula assistance

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Assistance with CountIF formula and additional formula conditions
    By solios in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-18-2016, 01:46 PM
  2. [SOLVED] Assistance with CountIF from a list
    By AceForSale in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 06-30-2016, 01:45 PM
  3. Assistance needed with the COUNTIF/COUNTIFS function.
    By BiomedRoss in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 07-15-2015, 08:30 AM
  4. [SOLVED] COUNTIF assistance, factoring in weighting
    By ripcorder in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-18-2015, 08:46 AM
  5. Assistance with formula (countif,sum,index)
    By omv_80 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-30-2014, 11:20 AM
  6. Need assistance with production summary template. Countif error?
    By Mike.handle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-18-2013, 02:42 PM
  7. Replies: 16
    Last Post: 01-26-2012, 07:02 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