+ Reply to Thread
Results 1 to 6 of 6

Sumifs Wild Character

  1. #1
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Sumifs Wild Character

    Hello,

    I have column A with years 2014, 2013, 2012 and column B with numeric values. Lets say there are 25 rows like that. Have a sumif that aggregates based on a dropdown (2012, 2013, 2014, ***). Everything works fine, until *** is selected which then does not act as a wild character. Whats the problem and how do I fix it?

    Thanks,

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: Sumifs Wild Character

    It wont work that way, because it is looking to criteria that actually are ***

    Try this approach instead. Include an "all" in the dd list, and modify the calc like this...
    A
    B
    C
    D
    2
    2012
    1
    all
    28
    3
    2012
    2
    4
    2012
    3
    5
    2013
    4
    6
    2013
    5
    7
    2014
    6
    8
    2014
    7

    C2=DD list containing 2012,2013,2014,all
    D2=IF(C2="all",SUM($B$2:$B$8),SUMIF($A$2:$A$8,C2,B2:B8))
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sumifs Wild Character

    or add apostrophe before each year in year range, will be treated as text

  4. #4
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Sumifs Wild Character

    Of course I used that cell in a countif that works with wild characters. My solution ended up being to convert the year to text and for some reason that does the trick. Where those fields are actually used as numbers, I multiply them by 1 before using them.

  5. #5
    Registered User
    Join Date
    04-15-2013
    Location
    NYC
    MS-Off Ver
    Excel 2007
    Posts
    84

    Re: Sumifs Wild Character

    Just saw that the poster above came up with the same solution as I did.

    What is the rule at play here? I got it to work, but not sure why strings and numbers are treated differently in a sumif.

  6. #6
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Re: Sumifs Wild Character

    "abc" => ISTEXT = TRUE
    "123" => ISTEXT = TRUE
    123 => ISTEXT = FALSE , ISNUMBER = TRUE
    * => ISTEXT = TRUE

+ 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. Search with wild (*) character
    By GEMINI528 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-15-2015, 06:59 PM
  2. [SOLVED] Wild character sumproduct...
    By Amolvijay in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-17-2014, 07:36 AM
  3. Wild Card Character search using Excel VBA
    By s.anurag1786 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-21-2013, 11:18 PM
  4. [SOLVED] Sumifs with wild characters and cell references
    By aurisab in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-05-2012, 09:54 PM
  5. what wild character to use for choosing numbers
    By purplewarda in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-28-2008, 12:40 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