Results 1 to 4 of 4

Type Mismatch on SumIfs

Threaded View

  1. #1
    Registered User
    Join Date
    09-10-2017
    Location
    Mansfield, UK
    MS-Off Ver
    2007
    Posts
    23

    Type Mismatch on SumIfs

    Hi,

    I am trying to loop through a range to fill in a table of data using the sumifs function but I keep getting a type mismatch error.

    I have attached the workbook. on the NB overview tab I am using the commission button to call the sub.

    The figures in column A to E are the identifies for the month and year. the Raw data is all on the trans data tab

    so far I have :

    Sub NBComs()
    
        Dim FigTab As Range
        Dim Cell As Range
        Dim Commission As Long
        
        Set FigTab = Range("G3:K14")
        For Each Cell In FigTab
            Commission = Application.WorksheetFunction.SumIfs( _
            Worksheets("Trans Data").Range("I:I"), _
            Worksheets("Trans Data").Range("O:O") = "New", _
            Worksheets("Trans Data").Range("R:R") = Cell.Offset(0, -6).Value)
            Cell.Value = Commission
        Next Cell
    
    End Sub
    Its probably something really simple that I'm missing but I haven't had much practice in calling worksheet functions

    Thanks
    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. Type mismatch
    By xtin0117 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-16-2015, 04:00 AM
  2. Type Mismatch
    By kestefon in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-06-2013, 04:17 PM
  3. Run Type error 13 Type Mismatch
    By Affan Khan in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 11-13-2012, 12:58 PM
  4. [SOLVED] Run-type error 13 type mismatch
    By misop in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 06-05-2012, 04:08 AM
  5. Type Mismatch: array or user defined type expected
    By ExcelMonkey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-06-2006, 10:45 AM
  6. Type mismatch using rnge as Range with Type 8 Input Box
    By STEVE BELL in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-03-2005, 01:10 AM
  7. [SOLVED] Help: Compile error: type mismatch: array or user defined type expected
    By lvcha.gouqizi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-31-2005, 05:05 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