+ Reply to Thread
Results 1 to 10 of 10

Nested IF help

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

    Nested IF help

    Hi guys,

    I could use some help with a nested IF function. Link to the spreadsheet: https://docs.google.com/spreadsheet/...FE&usp=sharing

    Please feel free to have a look, (Navigate to the "Signerte Q4" pane)

    I have two issues:

    1. I am trying to count the number of "Ja" in K7:V7 and come out with a percentage of "ja" to C7. So far i got this: =countif(K7:V7, "Ja")/counta(K7:V7) however this returns an error.

    2. I am trying to estimate revenue from our clients based on what we provide them with. J7 is the total pot of revenue and in the area K7:V7 is our products and an estimate of what percentage of the revenue the client spends on this product - we get a 5% commision on this sum.

    Example: If K7=Ja, then (22505000(J7)*0,3(L7))*0,05 and i want to extend this for all of K7:V7) and return it to D7.

    Would greatly appreciate any assitance with this!

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: Nested IF help

    Cannot edit the file. Suggest you upload a copy to this web site.


    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    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
    52,939

    Re: Nested IF help

    From what you say above, maybe this for point 1...
    =countif(K7:V7, "Ja")/C7

    Agree with Alan
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    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

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

    Re: Nested IF help

    Thanks for rapid response guys!

    Sorry about that, I have now edited the access rights, they were set to read only but editing is now open. Feel free to have another look if you have the time for it!

  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
    52,939

    Re: Nested IF help

    Not all members can access file-hosting sites like google docs (company fire-walls and stuff). Please (as already suggested) upload your file here

    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  6. #6
    Valued Forum Contributor
    Join Date
    07-17-2005
    Location
    Abergavenny, Wales, UK
    MS-Off Ver
    XL2003, XL2007, XL2010, XL2013, XL2016
    Posts
    608

    Re: Nested IF help

    Hi

    The problem is your locale.
    I think you need to use a ; not a , in the formula

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    --
    Regards
    Roger Govier
    Microsoft Excel MVP

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

    Re: Nested IF help

    Thanks,

    I have now uploaded the file for those who cant access it to review
    Attached Files Attached Files

  8. #8
    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
    52,939

    Re: Nested IF help

    for the 1st question, the formula...
    =(COUNTIF(K7:V7, "Ja")/COUNTA(K7:V7))*2
    looks fine, except why are you *2?
    If you want to stop error messages if the row is empty, then something like...
    =IF(B7="","",(COUNTIF(K7:V7,"Ja")/COUNTA(K7:V7))*2)

    For the 2nd question, try this...
    =J7*(IF(K7="ja",L7,0)+IF(M7="ja",N7,0)+IF(O7="ja",P7,0)+IF(Q7="ja",R7,0)+IF(S7="ja",T7,0)+IF(U7="ja",V7,0))/100

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

    Re: Nested IF help

    Thanks for the response!


    As to 1. (*2) is because all marked as yes returns 0,5 because i have twice as many rows as yes`s

    2. Unfortunatly this returns an error and does not appear to include the calculations in the OP..

  10. #10
    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
    52,939

    Re: Nested IF help

    I had that in D7, and it gave me 13503000

    Example: If K7=Ja, then (22505000(J7)*0,3(L7))*0,05 and i want to extend this for all of K7:V7) and return it to D7.

    Im not sure what the .05 is doing though?

    and also dont forget, the regional settings may be different

+ 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: 0
    Last Post: 10-01-2012, 05:54 AM
  2. Next without For error in nested loop - Escaping a Nested Loop?
    By BeneRich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2012, 06:38 PM
  3. For each loop nested; getting stuck on one cell in first iteration of nested loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2009, 11:54 AM
  4. Replies: 6
    Last Post: 01-14-2009, 06:59 PM
  5. help on a nested countif/nested if formula
    By vickiemc in forum Excel General
    Replies: 2
    Last Post: 08-13-2008, 08:29 AM

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