+ Reply to Thread
Results 1 to 7 of 7

Prevent auto-escaping characters in structured table reference?

  1. #1
    Registered User
    Join Date
    02-08-2010
    Location
    Denver
    MS-Off Ver
    Office 2013
    Posts
    6

    Prevent auto-escaping characters in structured table reference?

    I'm storing a string array in a table column, and then trying to properly reference that literal value in a SUMIFS formula.

    The value that I need the reference to evaluate to is: {"*ABC*,*XYZ*"} (because I'm looking for ABC or XYZ anywhere within a string)
    If I enter that text in a table cell, the reference to that cell evaluates as "{""*ABC*,*XYZ*""}" giving me extra quotes that screws up my formula.

    I've also tried making the table cell text simply *ABC*,*XYZ* and then referring to it as "{"&[@Apps]&"}" however that evaluates to "{*ABC*,*XYZ*}" which is almost right, but the outer quotes & braces are reversed from what I need.

    There's got to be a way to do this, but I sure can't seem to figure it out. Thanks!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Prevent auto-escaping characters in structured table reference?

    You can't enter an array constant like that. Enter *ABC* in one cell and *XYZ* in another and adapt the SUMIFS formula accordingly.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    02-08-2010
    Location
    Denver
    MS-Off Ver
    Office 2013
    Posts
    6

    Re: Prevent auto-escaping characters in structured table reference?

    Hmmm. I don't see how I could adapt the SUMIFS formula to effectively "OR" those values in different cells.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,147

    Re: Prevent auto-escaping characters in structured table reference?

    Try

    =SUMPRODUCT(SUMIFS(A2:A6,B2:B6,E2:F2))

    A2:A6 values to summed

    B2:B6 your text

    E2 = "*ABC*" (without the quotes)

    F2= "*XYZ*" (without the quotes)

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Prevent auto-escaping characters in structured table reference?

    A
    B
    C
    D
    1
    Hdr1
    Hdr2
    2
    xxABCxx
    3
    *ABC*
    3
    xxXYZxx
    5
    *XYZ*
    4
    xxDEFxx
    7
    5
    8
    B5: =SUMPRODUCT(SUMIF(A2:A4, D2:D3, B2:B4))

  6. #6
    Registered User
    Join Date
    02-08-2010
    Location
    Denver
    MS-Off Ver
    Office 2013
    Posts
    6

    Re: Prevent auto-escaping characters in structured table reference?

    I didn't know that specifying a range is equivalent to an array constant. That worked for me, but only after I changed my formula from =SUM(SUMIFS(... to =SUMPRODUCT(SUMIFS(... I have no idea why it wouldn't work using SUM.

    Thank you both, shg & JohnTopley!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Prevent auto-escaping characters in structured table reference?

    You're welcome.

    Quote Originally Posted by RykM View Post
    I didn't know that specifying a range is equivalent to an array constant.
    It's a range (which is treated as an array), not a constant.

    Quote Originally Posted by RykM View Post
    I have no idea why it wouldn't work using SUM.
    It would if it were array-entered (Ctrl+Shift+Enter instead of just Enter).

+ 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: 1
    Last Post: 05-15-2015, 04:31 PM
  2. Structured Reference to a Single Table Value
    By mcclanat in forum Excel General
    Replies: 3
    Last Post: 11-08-2014, 04:21 PM
  3. VLookup Structured Reference
    By goss in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-27-2014, 03:47 PM
  4. Structured Reference
    By EccentricScientist in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-03-2014, 04:15 PM
  5. Structured formula reference in table (2007) help please....
    By Tina G in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-07-2014, 10:11 AM
  6. [SOLVED] Prevent Graphs from auto populating dates not present in Table
    By retrospikz in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 06-26-2013, 02:53 AM
  7. [SOLVED] Excel table - using a formula in a structured reference
    By jankee in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2013, 08:10 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