Results 1 to 3 of 3

Why do I get countif blanks ?

Threaded View

rmccain Why do I get countif blanks ? 12-11-2016, 08:20 PM
protonLeah Re: Why do I get countif... 12-11-2016, 08:50 PM
Trebor76 Re: Why do I get countif... 12-11-2016, 08:53 PM
  1. #1
    Forum Contributor
    Join Date
    10-25-2012
    Location
    Honolulu, Hawaii
    MS-Off Ver
    Excel 2013
    Posts
    128

    Why do I get countif blanks ?

    Hello,

    I am trying to make the following code work correctly but all I get is get a blank. Truthfully, I would like to make an array out of this but I am stumped.

    Kindest regards to all those that help. Sample file is attached.

    Sub ITest()
    
    Dim ws As Worksheet
    Dim Val As Variant 'Double
    Dim LD As Long  '*
    
    
    Application.ScreenUpdating = False
    
    For Each ws In ActiveWorkbook.Worksheets
       With ws
     LD = .Range("A" & Rows.Count).End(xlUp).Row
        
    Val = Application.WorksheetFunction.CountIfs(.Range("I:I"), "=100", Range("I:I"), "=200", Range("I:I"), "=300", Range("I:I"), "=400")
        
        Range("K2:K" & LD).FillDown
        'Range("K10").Value = Val
        
         End With
    Next ws
    
    Application.ScreenUpdating = True
    
    End Sub
    Aloha
    Attached Files Attached Files

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Countif averages no blanks
    By psjpsjpsjpsj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2016, 04:52 AM
  2. Countif function counts blanks
    By ckenn134 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-27-2013, 03:31 PM
  3. If and Countif treat blanks differently?
    By studiosa in forum Excel General
    Replies: 4
    Last Post: 02-28-2012, 10:00 PM
  4. Ignore blanks when using COUNTIF
    By mattmac in forum Excel General
    Replies: 3
    Last Post: 05-27-2011, 04:56 AM
  5. SUMIF & COUNTIF and omitting blanks
    By stacks in forum Excel General
    Replies: 4
    Last Post: 06-29-2010, 10:11 AM
  6. Ignore blanks using =SUMIF/COUNTIF
    By Casper9T9 in forum Excel General
    Replies: 10
    Last Post: 06-05-2009, 05:26 PM
  7. COUNTIF sees blanks
    By savarin in forum Excel General
    Replies: 4
    Last Post: 11-04-2007, 05:04 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