+ Reply to Thread
Results 1 to 5 of 5

VBA Sumproduct Match

  1. #1
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    VBA Sumproduct Match

    Hi, I wonder whether someone may be able to help me please.

    I'm trying to put together a formula through VB which contains a number of criteria which need to be met for the correct result to be displayed.

    This is the formula which I've put together so far:

    Please Login or Register  to view this content.
    The problem I'm having is with this part of the formula:
    Please Login or Register  to view this content.
    What I'm trying to do is say that the value must equal "Leave". But when I run this, the results include those rows that contain the word "Leave", rather than just those where the cell content is exactly "Leave".

    I've tried changing this to say
    Please Login or Register  to view this content.
    ,
    Please Login or Register  to view this content.
    but unfortunately neither of these work.

    I just wondered whether someone could possibly look at this please and let me know where I'm going wrong.

    Many thanks and kind regards

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Sumproduct Match

    Try this...

    *(Task=""Leave""), AFTE)"


    Just like the syntax for your RLOB criteria.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Sumproduct Match

    Hi @AlphaFrog, thank you very much for taking the time to reply to my post, and for setting me straight. The formula now works perfectly. I must admit to being a little embarrassed at not spotting the obvious!

    All the best and kind regards

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: VBA Sumproduct Match

    You're welcome.

    You just had a touch of the tunnel vision. Everybody gets it once in a while.

  5. #5
    Forum Contributor
    Join Date
    05-26-2012
    Location
    United Kingdom
    MS-Off Ver
    Excel 2013
    Posts
    682

    Re: VBA Sumproduct Match

    Thank you for your understanding.

    Kind Regards

+ 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. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  2. Replies: 13
    Last Post: 12-13-2012, 11:44 AM
  3. [SOLVED] Sumproduct with match
    By Torleif in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-26-2012, 05:33 PM
  4. Replies: 5
    Last Post: 04-20-2012, 08:54 AM
  5. sumproduct match
    By okl in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-08-2011, 09:46 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