+ Reply to Thread
Results 1 to 8 of 8

sumproduct vba

  1. #1
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    sumproduct vba

    if i have 2 named ranges AA BB
    Range("A1")=Application.Sumproduct(Range("AA"),Range("BB")) ITS WORK OK BUT WHEN I ADD = 4 GIVE ME ERROR



    Range("A1")=Application.Sumproduct(Range("AA"),Range("BB")=4) error when add =4


    how to write vba sumproduct
    Last edited by mena; 10-21-2018 at 11:37 AM.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2403 Win 11 Home 64 Bit
    Posts
    23,811

    Re: sumproduct vba

    Attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    06-07-2016
    Location
    Manila
    MS-Off Ver
    365
    Posts
    292

    Re: sumproduct vba

    try:

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: sumproduct vba

    As Alan stated, a sample workbook would help.

    In the meantime, it appears you are trying to look at range BB and find where it equals 4 then Sum the corresponding cells in Range AA.

    Please Login or Register  to view this content.
    HTH
    Regards, Jeff

  5. #5
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,465

    Re: sumproduct vba

    Try
    Please Login or Register  to view this content.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: sumproduct vba

    With Named Ranges.
    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  7. #7
    Registered User
    Join Date
    03-19-2015
    Location
    iraq
    MS-Off Ver
    2013
    Posts
    99

    Re: sumproduct vba

    thanks alot bakerman2 that great

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: sumproduct vba

    Glad to help and thanks for rep+.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Combine sumif/sumproduct or sumproduct with multiple criteria
    By sab128 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-16-2018, 08:25 AM
  2. [SOLVED] Use sumproduct to further parse a sumproduct calculation
    By Araise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-19-2015, 08:17 PM
  3. Count SUMPRODUCT Members / Average of SUMPRODUCT
    By Shingaru in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-10-2014, 03:59 PM
  4. Replies: 1
    Last Post: 05-19-2012, 02:54 AM
  5. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  6. Replies: 6
    Last Post: 03-09-2011, 08:01 AM
  7. Using a SumProduct Count to find a SumProduct Total?
    By XL021710 in forum Excel General
    Replies: 3
    Last Post: 02-18-2010, 08:31 AM

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