+ Reply to Thread
Results 1 to 6 of 6

If Function Help Needed

  1. #1
    Registered User
    Join Date
    07-19-2015
    Location
    Tampa Florida
    MS-Off Ver
    xp
    Posts
    8

    If Function Help Needed

    using attached workbook, I am trying to figure out how to get the formula in column O to complete the following:

    If I2 = "" and cell K2 = "", then O2 = ""
    If I2 <> "" and cell K2 = "", then O2 = last day of month of date entered into I2 + end of 2nd month from month of day entered into cell I2.
    Example: I2=7/10/15, K2 is blank, O2 should then equal 9/30/15 which is the last day of the 2nd month past the last day of the month of July
    else if
    I2 <> "" and cell K2 <> "", the O2 = K2 + 365 days.
    else if
    J2 = 7 regardless if cells I2 or K2 have any dates entered into them, O2 = "Closed"
    thanks.
    Attached Files Attached Files

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: If Function Help Needed

    In O2

    =IF(J2=7,"Closed",IF(I2="","",IF(K2="",EOMONTH(I2,2),K2+365)))

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  3. #3
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: If Function Help Needed

    If I2 = "" and cell K2 = "", then O2 = ""
    Since this is the first IF that you stated, it appears that this is your top priority, so try this:
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    However, you also said
    J2 = 7 regardless if cells I2 or K2 have any dates entered into them, O2 = "Closed"
    which contradicts the first priority. If that is to be the top priority, then reverse the first two Ifs:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Acts 4:12
    Salvation is found in no one else, for there is no other name under heaven given to mankind by which we must be saved.

  4. #4
    Valued Forum Contributor natefarm's Avatar
    Join Date
    04-22-2010
    Location
    Wichita, Kansas
    MS-Off Ver
    2016
    Posts
    1,020

    Re: If Function Help Needed

    You hadn't mentioned what to do if I2 is blank and K2 is not blank, so I plugged K2 into O2 in that case.

  5. #5
    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
    53,048

    Re: If Function Help Needed

    Harry, please stop posting duplicate threads - I haver just closed 3 of them. If you have not has a deply after a day, consider "bumping" the thread to bring it back
    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

  6. #6
    Registered User
    Join Date
    07-19-2015
    Location
    Tampa Florida
    MS-Off Ver
    xp
    Posts
    8

    Re: If Function Help Needed

    Thanks. Works beautifully.

+ 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. If Then Function Help needed
    By wheatgrass in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-14-2012, 01:41 PM
  2. Help Needed with IF Function
    By Zyphon in forum Excel General
    Replies: 1
    Last Post: 04-02-2007, 06:32 PM
  3. [SOLVED] Function Help Needed
    By Harvey Gersin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-29-2005, 07:10 PM
  4. help needed in IF function
    By DaredEvil590 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-25-2005, 10:27 AM
  5. [SOLVED] Help needed with sum function
    By Angela@Singh.com in forum Excel General
    Replies: 7
    Last Post: 08-24-2005, 08:05 PM
  6. [SOLVED] Function needed please
    By Stadinx in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-20-2005, 03:06 AM
  7. [SOLVED] Help needed with IF function
    By Ed in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-23-2005, 01:06 PM
  8. [SOLVED] IF function help needed
    By jmcclain in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-23-2005, 01:06 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