Results 1 to 4 of 4

How to count PASS/FAIL cells in a range...

Threaded View

  1. #4
    Valued Forum Contributor ranman256's Avatar
    Join Date
    07-29-2012
    Location
    Kentucky
    MS-Off Ver
    Excel 2003
    Posts
    1,190

    Re: How to count PASS/FAIL cells in a range...

    2 ways...if you want to use a formula
    put a value in col C for pass, and col D for FAIL, using =IF(B2="PASS",1,"")
    then sum the columns
    or
    else VBA code:
    range("a1").select
    While ActiveCell.Value <> ""
       
    select case ActiveCell.value 
        case  "PASS" 
          iPass = iPass + 1
       
        case  "FAIL" 
          iFail = iFail + 1
    end select
       
       ActiveCell.Offset(1, 0).Select  'next row
    Wend
    
    msgbox ipass & " passed"
    msgbox iFail & " failed"
    Last edited by ranman256; 05-12-2014 at 12:16 PM. Reason: spellg

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to make a cell display "FAIL" when range of cells is FAIL
    By crazychile in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-18-2017, 04:13 PM
  2. [SOLVED] Need a formula for pass/fail based on no. of Y answers but automatically fail if 3a is N
    By Researcher1111 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 09-15-2013, 10:20 PM
  3. Replies: 5
    Last Post: 03-16-2010, 07:05 AM
  4. Replies: 13
    Last Post: 09-29-2008, 10:36 AM
  5. [SOLVED] Macro for test result Count as pass, fail and incomplete.
    By Amar in forum Excel General
    Replies: 1
    Last Post: 06-10-2005, 08: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