Results 1 to 3 of 3

Thread: Enter SUM SUMIFS Formula Using VBA

  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0

    Enter SUM SUMIFS Formula Using VBA

    Hello,

    The function below works perfectly in a spreadsheet; however I would like to enter it as VBA code. As you can see, there are two columns with multiple conditions and one column with a single condition. Thanks in advance. - Rick



    =SUM(SUMIFS($ER$11:$ER$100000,$C$11:$C$100000,{"00 002","00942","00102","00302"},$J$11:$J$100000,{"A" },$K$11:$K$100000,{"S";"N";"M";"P";"X"}))

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    is this what you need?

    Code:
    SomeRange.Formula = "=SUM(SUMIFS($ER$11:$ER$100000,$C$11:$C$100000,{""00 002"",""00942"",""00102"",""00302""},$J$11:$J$100000,{""A""},$K$11:$K$100000,{""S"";""N"";""M"";""P"";""X""}))"
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Feb 2013
    Posts
    2
    Rep Power
    0
    Yes, thank you.

    The double quotes threw me off. It works fine in VBA.

Similar Threads

  1. Sum Of The Digits In A Cell Using Formula
    By venkat1926 in forum Excel Help
    Replies: 0
    Last Post: 04-30-2013, 07:11 PM
  2. Replies: 11
    Last Post: 04-07-2013, 07:51 PM
  3. Sum Ifs Formula needed with Max Date range
    By trankim in forum Excel Help
    Replies: 2
    Last Post: 09-19-2012, 09:50 AM
  4. SUMIFS multiple criteria from same column
    By excel_learner in forum Excel Help
    Replies: 8
    Last Post: 06-30-2012, 01:56 PM
  5. Replies: 2
    Last Post: 03-31-2012, 10:46 PM

Posting Permissions

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