Consulting

Results 1 to 6 of 6

Thread: I am having a problem with the Application.Sumif function in vba

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Newbie
    Joined
    Dec 2015
    Posts
    4
    Location

    I am having a problem with the Application.Sumif function in vba

    Hi everyone,

    I have this code:

    Sub Sumif()
    
    Dim Sum As Long
    
    
    Description = UserForm2.comboClothing.Value
    
    
    Sum = Application.SumIf(Sheets("Inventory").Range("F2:F1014"), Description, Sheets("Inventory").Range("D2:D1014"))
    
    MsgBox Sum
    
    
    End Sub
    The value that is returned is always zero. I can't seem to figure out why. Thanks in advance for any help!
    Last edited by Bob Phillips; 12-15-2015 at 04:38 AM. Reason: Added VBA tags

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •