+ Reply to Thread
Results 1 to 7 of 7

Help with IF formulas

  1. #1
    Registered User
    Join Date
    03-15-2019
    Location
    Liverpool
    MS-Off Ver
    2016
    Posts
    9

    Question Help with IF formulas

    Hi

    Can you help me with a formula that returns the word "Primary" or "Secondary" based on a list of names and a list of sectors.

    Column A is the list of names, Column B is the list of Sectors and Column C is empty - for the Primary/Secondary data to be returned to.

    I've attached an example, what I'm hoping to do is:

    If Column A has "Mr A Test" and Column B is "Finance", return "Primary" in Column C.
    If Column A has "Mr A Test" and Column B is "Passenger", return "Secondary" in column C

    Hope you can help, thanks
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Help with IF formulas

    What is the relevance of the name???


    =IF(B2="Finance","Primary","Secondary")

    copied down. if that's not right, please show some manually calculated results.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    03-15-2019
    Location
    Liverpool
    MS-Off Ver
    2016
    Posts
    9

    Re: Help with IF formulas

    Hi Glenn,

    It didn't work.

    I have a list of names, each of them is allocated to a sector (the Primary) but sometimes they deal with a different sector (the Secondary)
    I've updated the original sample so hopefully it will put a bit more context around it.

    Mr A Test deals with Finance
    Mr B Test deals with Passenger

    Thanks
    Mark
    Attached Files Attached Files

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Help with IF formulas

    I knew it wasn't correct, as you hadn't supplied enough information!!

    =INDEX($G$1:$H$1,SUMPRODUCT(($G$2:$H$3=B2)*($F$2:$F$3=A2)*(COLUMN($G$2:$H$3)-COLUMN($G$2)+1)))

    see sheet for context.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-15-2019
    Location
    Liverpool
    MS-Off Ver
    2016
    Posts
    9

    Re: Help with IF formulas

    Thanks so much for your help, that's perfect. In my head it made perfect sense

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,984

    Re: Help with IF formulas

    That's 'cos you know what you're doing and are familiar with the requirement... We're not....

    You're welcome.



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

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,448

    Re: Help with IF formulas

    Please come up with a more descriptive thread title next time you need help (see forum rule #1). Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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. Copy Formulas from 'Formulas' Sheet into Data Table Columns
    By Jonny757 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-10-2020, 08:18 PM
  2. Make model faster: convert formulas to text and then back to formulas
    By lucassdm7 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-25-2019, 06:49 AM
  3. Replies: 3
    Last Post: 01-01-2016, 03:44 PM
  4. Replies: 9
    Last Post: 12-04-2015, 05:19 PM
  5. Using Cell references in file paths for formulas to create dynamic formulas
    By MichaelStokesJr in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-04-2013, 11:49 AM
  6. Replies: 5
    Last Post: 09-25-2013, 02:51 PM
  7. Replies: 5
    Last Post: 05-05-2008, 02:22 PM

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