Results 1 to 4 of 4

SUMIFS formula not working in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    06-28-2012
    Location
    Fairfax, va
    MS-Off Ver
    Excel 2007
    Posts
    4

    SUMIFS formula not working in VBA

    Hello all,

    Forgive me if this is confusing, it's my first post.

    I have the following string in VBA:

    If RVR.country1.Value = True Then
        Sheets("Graphical Overview").Range("B90").Value ="=SUMIFS('DataExport(1)'!$E:$E,'DataExport(1)'!$X:$X,$A90,'DataExport(1)'!$W:$W,B$89,'DataExport(1)'!$K:$K," <> "&7)"
    End If
    
    If RVR.region1.Value = True Then
        Sheets("Graphical Overview").Range("B90").Value = "=SUMIFS('DataExport(1)'!$E:$E,'DataExport(1)'!$X:$X,$A90,'DataExport(1)'!$W:$W,B$89,'DataExport(1)'!$K:$K,$C$83)"
    End If
    
    If RVR.state1.Value = True Then
        Sheets("Graphical Overview").Range("B90").Value = "=SUMIFS('DataExport(1)'!$E:$E,'DataExport(1)'!$X:$X,$A90,'DataExport(1)'!$W:$W,B$89,'DataExport(1)'!$Q:$Q,$C$83)"
    End If
    
    If RVR.org1.Value = True Then
        Sheets("Graphical Overview").Range("B90").Value = "=SUMIFS('DataExport(1)'!$E:$E,'DataExport(1)'!$X:$X,$A90,'DataExport(1)'!$W:$W,B$89,'DataExport(1)'!$A:$A,$C$83)"
    End If
    Everything works perfectly, except the portion in red.

    It worked fine outside of VBA in an empty cell, but once transferred to VBA, it returns FALSE. Am I missing something?

    Thanks in advance for the help.
    Last edited by meechie; 08-08-2012 at 04:48 PM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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