+ Reply to Thread
Results 1 to 5 of 5

SUMPRODUCT calculation in VBA

  1. #1
    Registered User
    Join Date
    10-24-2012
    Location
    Milano
    MS-Off Ver
    Excel 2003
    Posts
    4

    SUMPRODUCT calculation in VBA

    Hi to all dear MSEXCEL experts..

    First of all... Sorry for my english... It's poor

    I'm new in this forum.. and i need some help about the sumproduct function in VBA.

    I try to explain better my situation.

    SHEET(1)

    COLUMN B => Nation
    COLUMN E => PRODUCT LINE
    COLUMN F => TURNOVER

    SHEETS(2)

    Cells(a2) => Nation (dinamyc cell, linked to a combobox with all the PRODUCTLINE)
    COLUMN B => PRODUCT LINE
    COLUMN C => TURNOVER

    Well.. In sheets(2), cells(B6), the formula
    Please Login or Register  to view this content.
    work fine.. But it's very slow for various reason...

    So i need to calc the sumproduct in VBA and then write the result in cell(B6)...

    but i've got some difficult wrting VBA code...

    i try this (RAFF is sheets(1) and RIEP is sheets(2))

    Please Login or Register  to view this content.
    But i receive an error..

    Any ideas??
    Attached Files Attached Files
    Last edited by gianluca.calloni; 10-26-2012 at 06:14 AM.

  2. #2
    Registered User
    Join Date
    10-24-2012
    Location
    Milano
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: SUMPRODUCT calculation in VBA

    The file uploaded is a simple file to explain fornula and other...

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: SUMPRODUCT calculation in VBA

    I suggest you use a key column in your raff table instead of code
    Attached Files Attached Files
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: SUMPRODUCT calculation in VBA

    also if you can sort your raff table by country code first you can improve the formula efficiency by limiting the ranges it has to look at

  5. #5
    Registered User
    Join Date
    10-24-2012
    Location
    Milano
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: SUMPRODUCT calculation in VBA

    Hi Joseph.

    Thank for replay... Yes the index in column a could be a solution... I try to follow this way...

+ Reply to Thread

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