+ Reply to Thread
Results 1 to 4 of 4

Need to match to first three characters in column header...

  1. #1
    Registered User
    Join Date
    06-13-2013
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    2

    Need to match to first three characters in column header...

    I have a presentation set of data that feeds off of a pivot table. The presentation data uses Jan, Feb, Mar, etc....

    The source data table from Dynamics CRM uses Jan - 2013, Feb - 2013, Mar - 2013 in its column headers...

    The formula below works if I change the headers to match each other; however, this is not possible for the final deliverable.

    =SUM(INDEX('DataTable'!$C$4:$G$9,,MATCH(B$63,'DataTable!$C$4:$G$4,0)))

    Is there a way to modify part of the formula to only look at the first three characters of the source data so that Jan will match to Jan - 2013?

    I can't seem to use the LEFT function against a range, so that has been my main issue.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Need to match to first three characters in column header...

    Sure it can be done, but it's not quite clear

    In this formula
    =SUM(INDEX('DataTable'!$C$4:$G$9,,MATCH(B$63,'DataTable!$C$4:$G$4,0)))
    which of the hilghlighted parts has the longer string (Jan - 2013)

    And are the cells actually just text strings, or are they dates custom formatted to only show "MMM" or "MMM - YYYY"

    If they are literally just text strings, and it's the C4:G4 that is 'Longer', you can use a wildcard

    =SUM(INDEX('DataTable'!$C$4:$G$9,,MATCH(B$63&"*",'DataTable!$C$4:$G$4,0)))
    Last edited by Jonmo1; 06-13-2013 at 04:37 PM.

  3. #3
    Registered User
    Join Date
    06-13-2013
    Location
    Indianapolis, Indiana
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: Need to match to first three characters in column header...

    Wow, Jonmo1...!! You nailed it even with a poor description -- that was quick!!
    Last edited by mreinhard; 06-14-2013 at 09:12 AM.

  4. #4
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Need to match to first three characters in column header...

    Great, glad to help.

+ 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