+ Reply to Thread
Results 1 to 15 of 15

Formula error

  1. #1
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Formula error

    Dear friends,
    In cell ‘BE8’ I want to insert this formula but it is giving error ‘missing parentheses. It’s a result sheet and the terms are as follows:

    If the student is fail in 1 subject (<35) then the remark should be ‘F1’
    If the student is fail in 2 subject (<35) then the remark should be ‘F2’
    If the student is fail in 3 subject (<35) then the remark should be ‘F3’
    If the student is fail in 4 subject (<35) then the remark should be ‘F4’
    If the student is fail in 5 subject (<35) then the remark should be ‘F5’
    If the student is fail in 6 subject (<35) then the remark should be ‘F6’

    The formula is:

    Please Login or Register  to view this content.
    Please suggest me a correction.

    Thanking you.

    Sincerely,

    Mukesh
    Last edited by mukeshbaviskar; 04-06-2014 at 07:17 AM. Reason: Add code tag

  2. #2
    Registered User
    Join Date
    03-30-2014
    Location
    Suzhou,China
    MS-Off Ver
    Excel 2003
    Posts
    41

    Re: Formula error

    Hi,
    Maybe you can use this formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Welcome to China,Welcome to Suzhou...And,我是来学英文的。

  3. #3
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Formula error

    try
    ="F"&COUNTIF(J8,"<35")+COUNTIF(N8,"<35")+COUNTIF(R8,"<35")+COUNTIF(V8,"<35")+COUNTIF(Z8,"<35")+COUNTIF(AD8,"<35")
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  4. #4
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Formula error

    Hi etaf,
    Thank you for formula. It's working fine but only one correction is required. If the student is passed in all six subjects then the remark should be 'P all'. Now it's giving 'F0' which I don't want.

    Thank you.

    Sincerely,

    Mukesh

  5. #5
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Formula error

    Hi wcymiss,
    Thank you. The formula is working fine but if the student is passed in all six subjects then the remark should be 'P all'.

    Regards,

    Mukesh

  6. #6
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Formula error

    =IF( (COUNTIF(J8,">=35")+COUNTIF(N8,">=35")+COUNTIF(R8,">=35")+COUNTIF(V8,">=35")+COUNTIF(Z8,">=35")+COUNTIF(AD8,">=35"))=6, "P All", "F"&COUNTIF(J8,"<35")+COUNTIF(N8,"<35")+COUNTIF(R8,"<35")+COUNTIF(V8,"<35")+COUNTIF(Z8,"<35")+COUNTIF(AD8,"<35"))

    OR

    IF( (COUNTIF(J8,"<35")+COUNTIF(N8,"<35")+COUNTIF(R8,"<35")+COUNTIF(V8,"<35")+COUNTIF(Z8,"<35")+COUNTIF(AD8,"<35"))=0, "P All", "F"&COUNTIF(J8,"<35")+COUNTIF(N8,"<35")+COUNTIF(R8,"<35")+COUNTIF(V8,"<35")+COUNTIF(Z8,"<35")+COUNTIF(AD8,"<35"))

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula error

    =IF(SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"F"&SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"p all")
    or maybe
    =CHOOSE(1+SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"p all","f1","f2","f3","f4","f5","f6")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  8. #8
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Formula error

    Hi etaf,
    Ok! it's working fine. I need a final revision as follows:

    If the cells are blank then the remark column should be blank. Now it shows 'F0' which I don't want.

    Thanking you.

    Regards,

    Mukesh

  9. #9
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Formula error

    Hi martindwilson,
    Thank you.

    Regards,

    Mukesh

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Formula error

    does martindwilson version also not work for blank cells

    its going to get quite a lengthy formula to avoid blanks in 2003
    is that version of excel you are using ?

    this condition of F0 would be if ALL cells where blank

    =IF( AND(J8="", N8="",R8="",V8="",Z8="",AD8="" ), "",IF( (COUNTIF(J8,">=35")+COUNTIF(N8,">=35")+COUNTIF(R8,">=35")+COUNTIF(V8,">=35")+COUNTIF(Z8,">=35")+COUNTIF(AD8,">=35"))=6, "P All", "F"&COUNTIF(J8,"<35")+COUNTIF(N8,"<35")+COUNTIF(R8,"<35")+COUNTIF(V8,"<35")+COUNTIF(Z8,"<35")+COUNTIF(AD8,"<35")))

  11. #11
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula error

    =IF(SUMPRODUCT((J8:AD8="")*(MOD(COLUMN(J8:AD8),4)=2))=6,"",CHOOSE(1+SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"p all","f1","f2","f3","f4","f5","f6"))

  12. #12
    Forum Contributor
    Join Date
    12-15-2012
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    672

    Re: Formula error

    Hi Etaf and martindwilson,
    Thank you for guidance. Etaf's formula is working fine as per my requirement but it's very lengthy. No problem it's giving correct output in m. s. office 2007.

    martindwilson's formula is not giving correct output as per requirement. It shows '# value' in the cell. It's shorter but not giving correct output. martindwilson please remove the error in your formula because I like it and it's shorter.

    Thank you to both of you for taking trouble and sparing your valuable time to solve my problem.

    Sincerely,

    Mukesh

  13. #13
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula error

    works fine for me see attached
    Attached Files Attached Files
    Last edited by martindwilson; 04-06-2014 at 07:44 PM.

  14. #14
    Registered User
    Join Date
    03-30-2014
    Location
    Suzhou,China
    MS-Off Ver
    Excel 2003
    Posts
    41
    Quote Originally Posted by mukeshbaviskar:3651677
    Hi etaf,
    Thank you for formula. It's working fine but only one correction is required. If the student is passed in all six subjects then the remark should be 'P all'. Now it's giving 'F0' which I don't want.

    Thank you.

    Sincerely,

    Mukesh
    Hi,
    Formula: copy to clipboard
    Please Login or Register  to view this content.

  15. #15
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Formula error

    that still gives f6 for all blanks not blank ,the op added an extra requirement "If the cells are blank then the remark column should be blank."
    so maybe
    =IF(SUMPRODUCT((J8:AD8="")*(MOD(COLUMN(J8:AD8),4)=2))=6,"",SUBSTITUTE("F"&SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"F0","P all"))
    or even slightly shorter
    =IF(COUNT(J8,N8,R8,V8,Z8,AD8)=0,"",SUBSTITUTE("F"&SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"F0","P all")) a bit shorter still
    =IF(COUNT(J8,N8,R8,V8,Z8,AD8),SUBSTITUTE("F"&SUMPRODUCT((J8:AD8<35)*(MOD(COLUMN(J8:AD8),4)=2)),"F0","P all"),"")
    Last edited by martindwilson; 04-06-2014 at 07:57 PM.

+ 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] Inputbox error message. Formula you typed contains an error.
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 07-09-2013, 02:25 PM
  2. Formula Error-Error Message
    By Paige in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-25-2006, 04:15 PM
  3. Replies: 4
    Last Post: 03-24-2006, 07:20 AM
  4. [SOLVED] Error values:DIV/0! error in SumProduct formula with no division
    By Jerry W. Lewis in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 PM
  5. Formula error with Mac resulting in '#NAME' error
    By Linking to specific cells in pivot table in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-01-2005, 03:05 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