+ Reply to Thread
Results 1 to 6 of 6

Add "IF then"

  1. #1
    Registered User
    Join Date
    02-28-2013
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    13

    Add "IF then"

    Hi,

    I seem to have some more trouble with a long nested IF formula and got great help here the last time.

    The problem is as follows:

    =IF(E8=Data!I8;(L8-O8)*0,02+(O8*0,2);IF(E8=Data!G8;O8*0,4;IF(E8=Data!H8;O8*0,2;IF(E8=Data!J8;(L8-O8)*0,02+(O8*0,2);""))))

    I currently have the formula above which calculates based on choices in a dropdown list in E8. What i want to do is to simply add another criteria for it to run the entire sequence via a second dropdown list in F8 - Basically "If "JA"(Yes in norwegian" is chosen in F8 run the formula above, if not do nothing or return a zero.

    I thought this would be easy enough, however i keep returning an error.

    Would greatly appreciate if someone could have a look

    (PS this is a google sheet)

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Add "IF then"

    Hi,

    Have you tried

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-28-2013
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Add "IF then"

    Thanks for the quick response!

    Unfortunatly yes, this returns an error aswell but I cant figure out why.

    Could this be Google Sheets related? I read somwhere that MS Excel only support 7 nested IF`s - maybe Gdocs supports less?

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Add "IF then"

    Richard's formula will work in Sheets as long as you change the separators added to semicolons

    =IF(F8="JA";IF(E8=Data!I8;(L8-O8)*0,02+(O8*0,2);IF(E8=Data!G8;O8*0,4;IF(E8=Data!H8;O8*0,2;IF(E8=Data!J8;(L8-O8)*0,02+(O8*0,2);""))));"")
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Add "IF then"

    Quote Originally Posted by JosephP View Post
    Richard's formula will work in Sheets as long as you change the separators added to semicolons
    Good catch there Joseph. Not sure what happened there. My system separators are , so presumably I was manually editing the OPs formula and missed those two.

    Rgds

  6. #6
    Registered User
    Join Date
    02-28-2013
    Location
    Norway
    MS-Off Ver
    Excel 2003
    Posts
    13

    Re: Add "IF then"

    Thanks again guys - this works. The final formula:

    =IF(F8="Ja";IF(E8=Data!I8;(L8-O8)*0,02+(O8*0,2);IF(E8=Data!G8;O8*0,4;IF(E8=Data!H8;O8*0,2;IF(E8=Data!J8;(L8-O8)*0,02+(O8*0,2);""))));"")

+ 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] Excel 2010 -- "Visual Basic" "Macros" and "Record Macro" all disabled.
    By NicholasL in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-07-2017, 06:11 AM
  2. Replies: 3
    Last Post: 02-16-2011, 02:55 PM
  3. Replies: 5
    Last Post: 10-12-2010, 06:46 AM
  4. Replies: 5
    Last Post: 06-26-2006, 09:23 PM
  5. Replies: 7
    Last Post: 05-13-2006, 05:02 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