+ Reply to Thread
Results 1 to 25 of 25

Nested IF functions

Hybrid View

  1. #1
    Registered User
    Join Date
    06-16-2009
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Nested IF functions

    Quote Originally Posted by NBVC View Post
    And are there still going to be inputs in columns C and D?
    I've coloured the column in yellow which the expected values are. Above the yellow the if formula is calculating the values correctly, but after the yellow starts I need a formula that will reduce the value by 12.5 every second day (to correspond with the end of the life of that dose in the blood).

    After day 32 there will be no more values in column c and d as there will be no more dosing with the drug. The drug will then exit the blood stream based on the life, 32 days, so each initial dose will no longer release 12.5 into the blood stream after 32 days from that dose.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    08-31-2007
    Location
    SW Ireland
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2311 Build 16.0.17029.20068) 32-bit
    Posts
    540

    Re: Nested IF functions

    Try this in cell E2:

    =IF(ROWS($D$2:D2)<=32,SUM($D$2:D2)/32,IF(MOD(ROW(),2)=1,SUM($D$2:D2)/32-((ROW()-33)/2)*12.5,E3))
    Copy down as appropriate
    Excel 365 user. To unblock a downloaded macro-enabled workbook, go to your "Downloads" folder > right click on the workbook name > click 'Properties' > check the 'Unblock' checkbox. You can now open the workbook.

  3. #3
    Registered User
    Join Date
    06-16-2009
    Location
    Pretoria, South Africa
    MS-Off Ver
    Excel 2003
    Posts
    30

    Re: Nested IF functions

    Quote Originally Posted by deadlyduck View Post
    Try this in cell E2:

    =IF(ROWS($D$2:D2)<=32,SUM($D$2:D2)/32,IF(MOD(ROW(),2)=1,SUM($D$2:D2)/32-((ROW()-33)/2)*12.5,E3))
    Copy down as appropriate
    Thanks-appreciate the feedback.

    I'm finding that if I change the value from 400 to 500 in column D, I no longer get the correct figures.
    I'm not sure how the MOD function works or the negative ROW function.

    Appreciate any explanation on this.

    Thanks

    Ryan

+ 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