+ Reply to Thread
Results 1 to 7 of 7

IF function Problem

  1. #1
    Registered User
    Join Date
    11-07-2011
    Location
    Arcata, California
    MS-Off Ver
    2011 for MAC version 14.1.0
    Posts
    52

    IF function Problem

    Was trying to use the IF function and it works but do not know how to add multiple IF in a row.

    Example:

    Sales People are:

    Eric Christian
    Kevin Hulcy
    Michael Christian
    Scott Kornberg

    Whom ever enters in their name into the cover worksheet cell, I want another cell on an invoice worksheet to pull the correct data, pertaining to that sales person.

    If Eric Christian is the sales person =IF(A1="Eric Christian",Z1) Cell Z1 would have all the contact information required for Eric Christian. How do I use the same function but add all the other sales people?

    Tried this but did not work:

    =IF(A1="Eric Christian",Z1)IF(A1=Kevin Hulcy,Z2)IF(A1="Michael Christian",Z3)IF(A!="Scott Kornberg",Z4)

    Ideas? Solutions?

    Thanks,

    Eric

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: IF function Problem

    Try this:

    =IF(A1="Eric Christian",Z1,"")&IF(A1="Kevin Hulcy",Z2,"")&IF(A1="Michael Christian",Z3,"")&IF(A1="Scott Kornberg",Z4,"")

    There are other (better) ways of doing it with other functions, but this shows one way of joining those multiple IFs together.

    Hope this helps.

    Pete

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: IF function Problem

    We would need to know more about how your data is set up. Try to supply a small sample file (with no personal data) that clearly shows your setup and a few examples of what you want to achieve.

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: IF function Problem

    Hi Eric,

    You're close, but try:

    =IF(A1="Eric Christian",Z1,IF(A1="Kevin Hulcy",Z2,IF(A1="Michael Christian",Z3,IF(A1="Scott Kornberg",Z4,""))))

    or

    =INDEX(Z:Z,(LOOKUP(A1,{"Eric Christian","Kevin Hulcy","Michael Christian","Scott Kornberg"},{1,2,3,4})))
    Last edited by Paul; 04-25-2012 at 07:11 PM.

  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: IF function Problem

    Am I the only one who thinks there is actually more than 4 sales people????

  6. #6
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: IF function Problem

    Yes. And if there is more than 1 marketing person you're asking for trouble, too. That formula should be easy.


  7. #7
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,422

    Re: IF function Problem

    Well, the post as been marked as Solved, so presumably the OP has got what s/he wanted.

    Pete

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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