+ Reply to Thread
Results 1 to 5 of 5

If code same combine the description

Hybrid View

  1. #1
    Registered User
    Join Date
    05-29-2012
    Location
    Cyprus
    MS-Off Ver
    Excel 365
    Posts
    45

    If code same combine the description

    Hi,

    I have many rows of description but the same code for each one.
    I want to have all the descriptions in one cell for each code.

    SAMPLE.xlsx
    Thanks
    K.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: If code same combine the description

    1) In C2, add this formula, then copy down:
    =IF(A2=A3, B2&" - "&C3, B2)

    2) Copy the results from column C and click on B2, then do a Paste Special > Values
    This replaces the values in column B with the values from C

    3) In C2, change the formula to this and copy down:
    =A2<>A1

    4) Now filter column C for FALSE and delete all the visible rows

    5) Turn off the filter

    6) Delete column C
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert icestationzbra's Avatar
    Join Date
    01-07-2004
    MS-Off Ver
    2007, 2010
    Posts
    1,421

    Re: If code same combine the description

    see if this helps (i have had to use some helper columns, which are hidden)...
    - i.s.z -
    CSE, aka Array aka { }, formulae are confirmed with CONTROL+SHIFT+ENTER.
    Replace commas ( , ) with semicolons ( ; ) in formulae, if your locale setting demands.
    All good ideas are courtesy resources from this forum as well as others around the web.
    - e.o.m -

  4. #4
    Registered User
    Join Date
    05-29-2012
    Location
    Cyprus
    MS-Off Ver
    Excel 365
    Posts
    45

    Re: If code same combine the description

    Thank u so much for the help!!


    K.

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: If code same combine the description

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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