+ Reply to Thread
Results 1 to 7 of 7

User Defined Function for Summing a range based on multiple conditions

  1. #1
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    User Defined Function for Summing a range based on multiple conditions

    Hi All,

    I am looking for a user defined function to sum a range based on 8 conditions, that include wildcard characters.

    I have attached a example file, any assistance appreciated.

    Data Column is from O to W

    Output Column is B

    Criteria column is E to L

    If Criteria is <All>, then it should consider all in that column, if <<300..399 then it should consider all starting from 3 to 39, if <<310,320, then only both.

    Regards
    Jude
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: User Defined Function for Summing a range based on multiple conditions

    Can you explain the result of 300 in cell B5 ?


    Kind regards
    Leo

  3. #3
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: User Defined Function for Summing a range based on multiple conditions

    In this result = 200



    Kind regards
    Leo
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: User Defined Function for Summing a range based on multiple conditions

    In B5 the result is 200

  5. #5
    Forum Expert
    Join Date
    08-16-2015
    Location
    Antwerpen, Belgium
    MS-Off Ver
    2007-2016
    Posts
    2,380

    Re: User Defined Function for Summing a range based on multiple conditions

    in youre exemple 300

  6. #6
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: User Defined Function for Summing a range based on multiple conditions

    Revenue Amount
    Pastry 200
    Vegetables 500
    Fruits 300

    B5 is 200, B7 is 300

  7. #7
    Forum Contributor
    Join Date
    08-19-2009
    Location
    UAE
    MS-Off Ver
    Excel 2016
    Posts
    167

    Re: User Defined Function for Summing a range based on multiple conditions

    Hello Leo,

    Many thanks for the code, when i change the Description column from "A" to "C", the code is not working.

    Regards
    Jude

+ 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. Please help - function to find first digit in a user-defined range
    By alexchan in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-19-2016, 11:49 PM
  2. Function - Count User Defined Columns in a Range
    By dspblues in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-16-2014, 09:10 AM
  3. [SOLVED] Summing values in cells based on multiple conditions
    By OregonSenior in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-28-2014, 06:58 PM
  4. Summing based on multiple conditions
    By confu5ion in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 02-11-2010, 06:14 PM
  5. user defined function receiving a range as parameter
    By Marc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-14-2005, 03:05 PM
  6. Passing a named range into a user defined function
    By Simon Shaw in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-15-2005, 06:06 PM
  7. Replies: 0
    Last Post: 02-24-2005, 04:06 PM

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