+ Reply to Thread
Results 1 to 2 of 2

Turning off wildcard characters??

  1. #1
    Registered User
    Join Date
    10-06-2009
    Location
    Adelaide, Australia
    MS-Off Ver
    Excel 2007
    Posts
    40

    Turning off wildcard characters??

    Hi Everyone

    I am using a SUMIF formula to analyse phone extensions (for example):

    =SUMIF(Range,$B2&$C2&D$1,SumRange)

    My problem is that valid phone extensions are 7**## or 7****...

    When it performs the SUMIF calculation it treats the * and # as a wildcard and includes values from other phone extensions (e.g. 71245) in the sum.

    Is there a way to avoid this? I've tried variations using TEXT() and "" and CONCATENATE etc...

    I was intially using VLOOKUP formulas but this was becoming too unweildy.

    Any ideas??

    Cheers
    Steve

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Turning off wildcard characters??

    if you precede each asterisk or other wildcard with a tilde ~, it cancels the wildcard and looks for the specific character.

    I am not sure what exactly is in each of B2, C2 and D1, but if there are several asterisks, etc in any of those cells, you can incorporate substitute function to replace each * or other character with a ~*, etc.

    e.g.

    =SUMIF(Range,Substitute($B2&$C2&D$1,"*","~*"),SumRange)

    other character substitutions can be nested within the above Substitute function too.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

+ 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