Results 1 to 14 of 14

Excel sum formula with "*", written in VBA

Threaded View

  1. #1
    Registered User
    Join Date
    05-18-2011
    Location
    London, England
    MS-Off Ver
    Excel 2003
    Posts
    10

    Excel sum formula with "*", written in VBA

    I know this is really an excel function. But is there a way to get around the wildcards to write the following as vba code?

    Sub test()
     Cells(1, 1).Formula = _
        Application.Sum((Range("B:B") = "value1") *_
        (Range("C:C") = "value2") * Range("D:D"))
            
    End Sub
    Any help much appreciated.
    Last edited by Max Peacock; 05-19-2011 at 12:11 PM.

Thread Information

Users Browsing this Thread

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

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