Jump to content
Fórum Script Brasil
  • 0

VBA SumIfs bug em outro computador


Question

Salve galera,

 

To lidando com um bug bem bizarro ao usar a função SOMASES no VBA. Programei toda a planilha no meu computador e funciona tudo certinho na minha máquina, porém, ao tentar no PC do meu pai percebi que um trecho do código que usa WorksheetFunction.SumIfs() só ta retornando 0.  A seguir um pedaço simples que exemplifica:

Sub teste()
        Dim val As Integer
        Dim dat As Date
        dat = Planilha1.Range("N10").Value
        Planilha2.Activate
        val = WorksheetFunction.SumIfs(Range("C2:C1163"), Range("E2:E1163"), Sheet1.Range("B19"), Range("B2:B1163"), "C", Range("A2:A1163"), "<=" & dat)
        MsgBox val
End Sub

No meu pc essa linha retorna 865, no do meu pai apenas 0. Alguém sabe o que pode estar causando isso? Agradeço demais!!

 

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Cloud Computing


  • Forum Statistics

    • Total Topics
      149264
    • Total Posts
      645605
×
×
  • Create New...