+ Reply to Thread
Results 1 to 12 of 12

If/Then formula help

  1. #1
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    If/Then formula help

    I'm trying to calculate deadlines for various publications using the following formula:

    =IF(B2="Mag",C2-21,IF(B2="Tab",C2-5),IF(B2="Broad",C2-5),IF(B2="ROP,C2-2))

    Where B2 signifies the type of publication. However, when I try to use the formula, Excel tells me that I have entered "too many arguments for this function"

    Any help would be much appreciated!

  2. #2
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: If/Then formula help

    =IF(B2="Mag",C2-21,IF(B2="Tab",C2-5,IF(B2="Broad",C2-5,IF(B2="ROP",C2-2))))
    You had a couple extra () brackets...

  3. #3
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    Re: If/Then formula help

    You're a lifesaver, thank you!

  4. #4
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: If/Then formula help

    Remeber to click the star below my name then...

  5. #5
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    Re: If/Then formula help

    One more question, I need the formula to only return workdays. Would this work?

    =WORKDAY(IF(B3="Mag",C3-21,IF(B3="Tab",C3-5,IF(B3="Broad",C3-5,IF(B3="ROP",C3-2)))))

  6. #6
    Forum Contributor Legend Rubber's Avatar
    Join Date
    09-21-2012
    Location
    Tillsonburg, Ontario
    MS-Off Ver
    Excel 2010
    Posts
    392

    Re: If/Then formula help

    sorry, i dont understand your application...
    i am only looking at code... when i test the new formula it ways too few arguments...
    i am not familiar with =WORKDAY...

  7. #7
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    Re: If/Then formula help

    I need the days that are returned to be working days. I see that the WORKDAY function in Excel can help with that, but I don't know how to make the formula correctly.

  8. #8
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If/Then formula help

    What's in C3? A date? Are the values (i.e C3-21) supposed to represent # of days since start? Do you not want to count weekend days or just not end up on a weekend day? A little more information will go a long way.
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  9. #9
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    Win10/MSO2016
    Posts
    12,995

    Re: If/Then formula help

    What's in C2 & C3? How are the cells formatted?
    Ben Van Johnson

  10. #10
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    Re: If/Then formula help

    B3 is the type of publication, "Tab", "Broad", "ROP" or "Mag"
    C3 is the date that the publication is released.
    The values represent the number of working days needed to complete a task. Since we don't work on week ends, I need the resulting date to be on a week day so I can communicate that deadline with others on my team. So C3 might be Sept. 21 and I need D3 to represent C3-21 working days, but the result must be a work day.

    Does that help?

  11. #11
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: If/Then formula help

    Okay, you want
    =WORKDAY(C3,IF(B3="Mag",21,IF(B3="Tab",5,IF(B3="Broad",5,IF(B3="ROP",2)))))
    where C3 is your start date, and the values in the IF statement are the number of business days after start date
    Format the cell as date.

  12. #12
    Registered User
    Join Date
    12-11-2012
    Location
    Reno, NV
    MS-Off Ver
    Office 365
    Posts
    15

    Re: If/Then formula help

    Thank you for the help!

+ 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