Results 1 to 4 of 4

Reference VBA object within worksheet function "countifs"

Threaded View

  1. #1
    Registered User
    Join Date
    06-26-2014
    Location
    Newark, Delaware
    MS-Off Ver
    2010 Excel
    Posts
    13

    Lightbulb Reference VBA object within worksheet function "countifs"

    Hey guys, so I'm pretty new to VBA and I've been using it at my work a lot lately and I keep having a problem that my code isn't referencing the "=tier" in the countifs. Anyone know how to fix this?

    Sub tiers()
    
    Dim tier As Integer
    
    For Each mycell In Sheets("New File").Range("c8:c27")
        tier = mycell.Row - 7
        mycell.Value = Application.WorksheetFunction.CountIfs(Sheets("Orig File").Range("a10:a99999"), ">0", _
        Sheets("Orig File").Range("u10:u99999"), "=tier")
    Next mycell
    
    End Sub
    Any help is very much appreciated
    Last edited by pwells; 06-26-2014 at 08:26 AM. Reason: code tags

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Countifs problem - Using the "OR" function or someting similar
    By shepherdc2814 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-23-2014, 05:58 PM
  2. Replies: 1
    Last Post: 09-07-2012, 12:08 AM
  3. "The "sheets" method from the "_Global" object have failed."
    By mankit87 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2011, 08:53 AM
  4. cell references in "COUNTIFS" function
    By mmrtech in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-30-2007, 04:25 PM
  5. What is Error "Method "Paste" of object "_Worksheet" failed?
    By vat in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-17-2006, 04:10 PM

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