+ Reply to Thread
Results 1 to 6 of 6

Nested IF Function

  1. #1
    Registered User
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    MS Office 10
    Posts
    42

    Nested IF Function

    Formula below works perfectly fine but I need to add another IF function and not sure how to do that.

    In Column S, I have "yes" or "no" in each cells and I need the new formula to say that IF there's a "yes" in S5, then take the formula below. If there's a "no", T5 should be blank.

    Any help would be greatly appreciated.


    =(IF(T$3<'Input Sheet'!$F53,'Input Sheet'!$E53/13,(IF(T$2>'Input Sheet'!$I53,'Input Sheet'!$K53/13,(IF((AND(T$2>'Input Sheet'!$F53,T$3<'Input Sheet'!$I53)),'Input Sheet'!$H53/13,(IF(AND(T$2<='Input Sheet'!$F53,T$3>='Input Sheet'!$F53),(((TEXT('Input Sheet'!$F53-Period!T$2,$A$1)+1)/28*'Input Sheet'!$E53/13)+(TEXT(T$3-'Input Sheet'!$F53,$A$1)/28*'Input Sheet'!$H53/13)),IF(AND(T$2<='Input Sheet'!$I53,T$3>='Input Sheet'!$I53),(((TEXT('Input Sheet'!$I53-Period!T$2,$A$1)+1)/28*'Input Sheet'!$H53/13)+(TEXT(T$3-'Input Sheet'!$I53,$A$1)/28*'Input Sheet'!$K53/13)),"problem")))))))))

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Nested IF Function

    Assuming the formula is in T5 try: =IF(S5="No","",IF(T$3<'Input Sheet'!$F53,'Input Sheet'!$E53/13,(IF(T$2>'Input Sheet'!$I53,'Input Sheet'!$K53/13,(IF((AND(T$2>'Input Sheet'!$F53,T$3<'Input Sheet'!$I53)),'Input Sheet'!$H53/13,(IF(AND(T$2<='Input Sheet'!$F53,T$3>='Input Sheet'!$F53),(((TEXT('Input Sheet'!$F53-Period!T$2,$A$1)+1)/28*'Input Sheet'!$E53/13)+(TEXT(T$3-'Input Sheet'!$F53,$A$1)/28*'Input Sheet'!$H53/13)),IF(AND(T$2<='Input Sheet'!$I53,T$3>='Input Sheet'!$I53),(((TEXT('Input Sheet'!$I53-Period!T$2,$A$1)+1)/28*'Input Sheet'!$H53/13)+(TEXT(T$3-'Input Sheet'!$I53,$A$1)/28*'Input Sheet'!$K53/13)),"problem")))))))))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  3. #3
    Registered User
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    MS Office 10
    Posts
    42

    Re: Nested IF Function

    Yes thank you - that worked - that was easy

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,557

    Re: Nested IF Function

    You're Welcome and thank you for the feedback. Please take a moment to mark the thread as 'Solved' using the thread tools link above your first post. I hope that you have a blessed day.

  5. #5
    Registered User
    Join Date
    03-16-2017
    Location
    UK
    MS-Off Ver
    MS Office 10
    Posts
    42

    Re: Nested IF Function

    hi JeteMc.

    Any idea why my formula in cell I2 in the Input sheet isn't working.

    I also need the contract to be calculated based on the Expiry date column and Extension column in Input Sheet Tab.

    If extension is "NO" and contract ends on 2-Mar-18 - it should stop on that date which would be in column L in the period Tab.

    If there's a "YES" in extension than it should continue but new price should be adjusted by % in column G in the Input sheet. i.e. if PetroChina has 3% price adjustemnt,
    then the new price column H in Input sheet should kick in after expiration date.

    I think my formula in the Period tab is wrong as it calculates period breakdown according to dates and it does not match total contract adjustment.

    Any help would be great appreciated.

    paul
    Attached Files Attached Files

  6. #6
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Nested IF Function

    Hi,

    Regarding the formula in I2 in the Input Sheet. The formula looks good. This issue is the date value in column B. Your dates are preceded with an apostrophe ('). Remove the apostrophe and the formula in I2 works.

    Looking at your other inquiries.

    Hope this makes sense and is helpful.

    Cheers

+ 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. [SOLVED] Nested vlookup or nested IFAND function?
    By jeptik in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-11-2017, 02:27 AM
  2. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  3. COUNTIF/COUNTIFS function + nested user-defined function
    By shamjamali in forum Excel General
    Replies: 1
    Last Post: 05-12-2015, 09:12 PM
  4. [SOLVED] Nested Function With Division - Receiving #VALUE! Function Error
    By DDM64 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-17-2013, 01:16 PM
  5. nested MATCH function within the INDEX function
    By thechoosenonesdream in forum Excel General
    Replies: 4
    Last Post: 10-25-2012, 03:55 PM
  6. [SOLVED] Nested AND function within IF function is only addressing logical1 but not logical2
    By betic in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-20-2012, 09:17 AM
  7. [SOLVED] Offset function with nested match function not finding host ss.
    By MKunert in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-21-2006, 06:50 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