+ Reply to Thread
Results 1 to 4 of 4

Find substring in range and categorise cells in range based on substring found

  1. #1
    Registered User
    Join Date
    03-14-2020
    Location
    Sydney, Australia
    MS-Off Ver
    2010
    Posts
    2

    Find substring in range and categorise cells in range based on substring found

    Hi there forum,
    I have a list of transactions that I am trying to allocate a category and sub-category to.
    The transaction list consists of a string as the Description, part of which can be the same for each transaction, but with a variable code attached at the end, no consistent length of the string.
    Is it possible (with formula) to use a reference table to look for a substring in the Description string then allocate a category & subcategory to the transaction based on the substring found?
    Cheers, S.
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2019; 365
    Posts
    231

    Re: Find substring in range and categorise cells in range based on substring found

    Made an array formula (confirm with CTRL + SHIFT + ENTER) that works:

    F3 =INDEX(J$3:J$20;MATCH(1;COUNTIF($D3;"*"&$I$3:$I$20&"*");0))

    Drag right then drag down both F3 and G3.

    You can also check attached file.
    Attached Files Attached Files
    To show your appreciation
    Click ★ Add reputation!

  3. #3
    Registered User
    Join Date
    03-14-2020
    Location
    Sydney, Australia
    MS-Off Ver
    2010
    Posts
    2

    Re: Find substring in range and categorise cells in range based on substring found

    Thanks Mrrrr!
    Working a treat

  4. #4
    Forum Contributor
    Join Date
    10-30-2019
    Location
    Bistrita, Romania
    MS-Off Ver
    2019; 365
    Posts
    231

    Re: Find substring in range and categorise cells in range based on substring found

    You are welcome. Glad I could help.

    Please mark thread as solved too.

+ 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: 8
    Last Post: 03-09-2018, 11:39 AM
  2. Macro to search cells for substring and replace contents of cell if substring is found
    By robbyvegas in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2015, 06:40 AM
  3. Get a minimum value in a substring of a range
    By sargedessy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-05-2015, 11:14 PM
  4. Search substring within range, report the substring found
    By Brooke1578 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 12-20-2012, 03:56 PM
  5. [SOLVED] Extract Substring, then Ignore that Substring, while collecting data from Other substrings
    By Sameki121 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 04-17-2012, 05:21 PM
  6. Replies: 3
    Last Post: 03-04-2011, 02:25 PM
  7. Counting occurences of a substring in a range of cells.
    By Jeff Cantwell in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-08-2005, 06:05 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