+ Reply to Thread
Results 1 to 7 of 7

Concatenate function not working as expected

  1. #1
    Registered User
    Join Date
    07-29-2016
    Location
    dallas, tx
    MS-Off Ver
    365
    Posts
    51

    Concatenate function not working as expected

    My workbook has two worksheets - "Voucher" and "Totals". I need to copy the text (names of counties) in a range of cells K5:K123 on "Voucher" over to a single cell B6 on "Totals". However, I only need the names of the counties that meet a specific date range criteria on the Voucher worksheet that are in three date columns, S5:S123, V5:V123, Y5:Y123. Also, some counties will be duplicated in the results and I don't want the duplicates, but do want the results separated by commas. I've searched endlessly for formulas or VB codes, but have not come up with anything that meets the criteria where I don't have to redo the concatenate each time. I need this to be an automatic function. I've written code and formulas for all the other areas in the workbook, but have to say I'm stumped. Help with starting over in a better direction is much appreciated.

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Concatenate function not working as expected

    Can you attach a sample workbook? Its easier to understand when you can actually see the sheet.

    Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    07-29-2016
    Location
    dallas, tx
    MS-Off Ver
    365
    Posts
    51

    Re: Concatenate function not working as expected

    I'll attach a sample workbook shortly. Thank you for your help!
    Last edited by katiedee1625; 02-16-2018 at 06:37 PM.

  4. #4
    Registered User
    Join Date
    07-29-2016
    Location
    dallas, tx
    MS-Off Ver
    365
    Posts
    51

    Re: Concatenate function not working as expected

    Attached is a sample workbook. Thank you for your help.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Concatenate function not working as expected

    This proposed solution employs four helper columns that are added to the Vouchers sheet.
    The array entered formula* that populates columns E:F is:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    The formula that populates the columns G:H is: =IF(AND(ROW()=3,E4<>""),E3&", ",IF(E4<>"",G2&E3&", ",G2&E3))
    On the Totals Before sheet the blue cells are linked to the last formula populated cell in columns G and H respectively.
    *Array entered formulas are confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    07-29-2016
    Location
    dallas, tx
    MS-Off Ver
    365
    Posts
    51

    Re: Concatenate function not working as expected

    Thank you so much for your help, this solved the problem and works beautifully!

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,570

    Re: Concatenate function not working as expected

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ 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. Aggregate Function Not Working As Expected
    By tjnelso in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-06-2016, 04:55 PM
  2. [SOLVED] worksheets function not working as expected
    By elmasguapo in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-15-2015, 05:18 AM
  3. Networkdays function not working as expected
    By Rem0ram in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-02-2014, 09:29 AM
  4. [SOLVED] CONCATENATE and IF function not working
    By codyryan in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-10-2013, 04:08 PM
  5. IF function not working with concatenate
    By rupes0610 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 08-09-2012, 11:50 AM
  6. Replies: 6
    Last Post: 05-07-2012, 10:49 AM
  7. [SOLVED] Hyperlink Function not working as expected
    By Hari Prasadh in forum Excel General
    Replies: 2
    Last Post: 04-16-2005, 09:08 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