+ Reply to Thread
Results 1 to 4 of 4

Combining Two Functions into One Function?

  1. #1
    Registered User
    Join Date
    07-05-2013
    Location
    Ohio, US
    MS-Off Ver
    Excel 2013
    Posts
    32

    Combining Two Functions into One Function?

    Last week AC-XL shared this function....

    Cell S2 =SUBSTITUTE(TRIM(K2&" "&L2&" "&M2&" "&N2&" "&O2&" "&P2&" "&Q2&" "&R2)," ","; ")

    for combining fields without getting extra spaces or semi-colons. It works great. Now Im wondering if it is possible to add a refinement that would make things even easier.

    Before using AC-XLs function above, I manually insert columns (K thru S) and then manually add this function......

    Cell K2 =IF(C2="x",C$1,"")
    Cell L2 = =IF(D2="x",D$1,"")
    etc.

    .which basically copies the Column label into the field if it has an x in it. Only then can I use AC-XLs function.

    Any way to combine this all in one function?

  2. #2
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Combining Two Functions into One Function?

    SpeakingPeace,

    To combine them both, it would look like this:
    Please Login or Register  to view this content.

    An alternative, however, is to use a UDF, like my ConcatAll UDF which can be found here:
    http://www.excelforum.com/tips-and-t...geravatar.html

    Use the code in post 8 of that thread for the UDF itself
    Use the instructions in the first post for how to implement it

    Then you would use this array formula in cell S2 and copied down. Note that array formulas must be entered with Ctrl+Shift+Enter and not just Enter:
    Please Login or Register  to view this content.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-05-2013
    Location
    Ohio, US
    MS-Off Ver
    Excel 2013
    Posts
    32

    Re: Combining Two Functions into One Function?

    Tigeravatar,

    Thank you! It works like a charm and is a bit help.

  4. #4
    Forum Guru tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Combining Two Functions into One Function?

    You're very welcome

+ 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