+ Reply to Thread
Results 1 to 7 of 7

Error checking

  1. #1
    Registered User
    Join Date
    10-11-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2010
    Posts
    17

    Error checking

    Hi,
    I am making up an inputs spread sheet and trying to include some formulas which will check to see if there has been some errors. I have attached an example sheet so you will hopefully understand my problem
    I am currently using "if" and "Count" but there not good enough as you will see in the example.
    Each section should only have one tick (i'm using 1 as a tick as i need the numbers further in the sheet) which means test 1 is right, test 2 the check works but for test 3 as there is two mistakes they cancel each other out.
    Is there a better way which will prevent this?

    Thanks in advance for your help
    Kello
    Attached Files Attached Files
    Last edited by kello99; 11-05-2012 at 09:35 AM.

  2. #2
    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,936

    Re: Error checking

    not sure if i understand you, but try this in F4, copied down?

    =IF(COUNT(C4:E4)>1,"Error","")
    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

  3. #3
    Registered User
    Join Date
    10-11-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Error checking

    Hi FDibbins
    Thanks for ur help but thats not where i need the check, the check is for the bottom of each test in row 25 where i currently have then but they are not quiet right

  4. #4
    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,936

    Re: Error checking

    ok try this, it is not very pretty, but gives you what you want...
    =IF(OR(COUNTIFS(C4:C23,">"&0,$F$4:$F$23,"Section 1")>1,COUNTIFS(C4:C23,">"&0,$F$4:$F$23,"Section 2")>1,COUNTIFS(C4:C23,">"&0,$F$4:$F$23,"Section 3")>1,COUNTIFS(C4:C23,">"&0,$F$4:$F$23,"Section 4")>1,COUNTIFS(C4:C23,">"&0,$F$4:$F$23,"Section 5")>1),"too many inputs","No Error")

  5. #5
    Registered User
    Join Date
    10-11-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Error checking

    Hi FDibbins
    that formula worked thanks but i just wondering so i can understand it, what is the &0 part for in the countifs,
    Again thanks for ur help
    kello

  6. #6
    Valued Forum Contributor
    Join Date
    09-10-2012
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2010
    Posts
    929

    Re: Error checking

    Hi kello99,

    &0 is part of the criteria to check if cells in the array C4:C23 is greater than 0...

    In other words ">"&0 is just a concatenation of the ">" greater than symbol and 0 zero

    Hope that helps... nice work, FD...

  7. #7
    Registered User
    Join Date
    10-11-2012
    Location
    Edinburgh
    MS-Off Ver
    Excel 2010
    Posts
    17

    Re: Error checking

    Thanks djapigo thats a great help
    cheers kello

+ 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