+ Reply to Thread
Results 1 to 9 of 9

Nested If Function Formula

  1. #1
    Registered User
    Join Date
    10-26-2021
    Location
    US
    MS-Off Ver
    MS365 Apps for Enterprise
    Posts
    3

    Exclamation Nested If Function Formula

    I need a formula that will populate the most current date out of N2,S2, and X2. But I can't have 1900. I need it to be blank or one of the dates listed in those three columns.

    This is the formula I am using and it is only populating a blank:

    =IF(AND(NOT(ISBLANK(N3)),ISBLANK(S3),ISBLANK(X3)),N3,IF(AND(NOT(ISBLANK(N3)),NOT(ISBLANK(S3)),ISBLANK(X3)),S3,IF(AND(NOT(ISBLANK(N3)),NOT(ISBLANK(S3)),NOT(ISBLANK(X3))),X3,"")))10:46avatarPopulate N2, if which cells have data?10:46


    If I use this formula it only pulls N2 even if there is data in S2 or X2

    =IF(NOT(ISBLANK(N4)),N4,IF(AND(NOT(ISBLANK(N4)),NOT(ISBLANK(S4))),S4,IF(AND(NOT(ISBLANK(N4)),NOT(ISBLANK(S4)),NOT(ISBLANK(X4))),X4,"")))

    If I use this formula is still only returns N2 even is S2 or X2 has data
    =IF(NOT(ISBLANK(N5)),N5,IF(NOT(ISBLANK(S5)),S5,IF(NOT(ISBLANK(X5)),X5,"")))
    Attached Files Attached Files
    Last edited by Cfelten; 10-26-2021 at 12:18 PM. Reason: add attachment

  2. #2
    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
    81,213

    Re: Nested If Function Formula

    Welcome to the forum.

    There are instructions at the top of the page explaining how to attach your sample workbook.

    Administrative Note

    Members will tailor the solutions they offer to the version of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect - 2109 is a release number, not a version. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. 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.

  3. #3
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Nested If Function Formula

    First of all welcome

    It is not so clear what you are asking. attaching a spreadsheet as per the instruction in the yellow banner makes things easier for us to see. But a cell in a spreadsheet can contain a formula or a value, it can't contain both. the only way you can do this is with some vba code.

    can you explain further

    Thanks

  4. #4
    Registered User
    Join Date
    10-26-2021
    Location
    US
    MS-Off Ver
    MS365 Apps for Enterprise
    Posts
    3

    Re: Nested If Function Formula

    Thanks so much, I have added an example report and my version of Excel.

  5. #5
    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
    81,213

    Re: Nested If Function Formula

    A good sample workbook has just 10-20 rows of representative data. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Try again, please.

  6. #6
    Valued Forum Contributor
    Join Date
    09-30-2018
    Location
    Vlaams Brabant Belgium
    MS-Off Ver
    365
    Posts
    456

    Re: Nested If Function Formula

    hi try this

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by Joske920; 10-28-2021 at 05:43 AM. Reason: european formula format to normal?? ; to ,
    Please be as complete as possible in your asking so it may save use all the time to rework the solution because you didn't give all the requirements. If you have a layout in mind please work it out first so we can adapt our solution to it. Thanks.
    If you have been helped, maybe you could click the *

  7. #7
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: Nested If Function Formula

    If you just want to lose the dates that are "rubbish when the values are blank

    either
    =IF(MAX(A2:C2)=0,"",MAX(A2:C2))

    or
    =MAX(A2:C2) and custom format the cell
    dd/mm/yyyy;;

    it turns the zeros to blanks as they are displayed

    Is this what you are after?

  8. #8
    Registered User
    Join Date
    10-26-2021
    Location
    US
    MS-Off Ver
    MS365 Apps for Enterprise
    Posts
    3

    Re: Nested If Function Formula

    Thank you so much! That is what I needed. Can you please explain the formula so that I can understand it for next time?

    Am I correct in thinking that is says is A2:C2 are 0 return a blank and if not return the max?

  9. #9
    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
    81,213

    Re: Nested If Function Formula

    Your Office version is MS365 Apps for Enterprise - this is what needs to be in your profile, please. Version numbers mean nothing to most people, and will have to be looked up, which is a waste of your helpers' time.

    =IF(MAX(A2:C2)=0,"",MAX(A2:C2))

    If the maximum value in A2 to C2 is 0, return a blank, otherwise return the maximum value in A2 to C2.

+ 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. Replies: 1
    Last Post: 03-02-2021, 10:50 PM
  2. Replies: 2
    Last Post: 01-05-2019, 03:33 AM
  3. MAX function using nested IF formula
    By kdestef1 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-07-2018, 01:55 AM
  4. Add a formula to a nested if function
    By JeninQC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-13-2018, 08:07 AM
  5. Nested formula in IF Function
    By Shaun Gemiver in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-18-2012, 10:10 AM
  6. [SOLVED] Need help with revising nested formula IF function.
    By digibay in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2012, 02:31 PM
  7. Nested IF function, can't figure out the formula
    By gibby82 in forum Excel General
    Replies: 2
    Last Post: 02-01-2012, 01:35 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