Concatenate based on values in another column

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,956
Office Version
365
Platform
Windows
Try
Code:
' Removes Brackets
    Cells.Replace What:=" (*)", Replacement:="", LookAt:=xlPart, SearchOrder _
        :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Note the space before the bracket
 

Some videos you may like

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

Steve1977

New Member
Joined
May 16, 2019
Messages
33
Try
Code:
' Removes Brackets
    Cells.Replace What:=" (*)", Replacement:="", LookAt:=xlPart, SearchOrder _
        :=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=False
Note the space before the bracket
:) :) Nice one sir!
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,956
Office Version
365
Platform
Windows
You're welcome & thanks for the feedback
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,956
Office Version
365
Platform
Windows
For future reference

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 

Steve1977

New Member
Joined
May 16, 2019
Messages
33
Apologies for the cross posting - certainly won't be doing that again especially with how helpful this place is :)

I'm revisiting my file and wondered if it's possible to tweak and to apply a minimum and maximum date. Basically, this is my data

PARTNO1HyundaiAccent01/01/9431/12/99
PARTNO1Hyundaii3001/01/9831/12/16
PARTNO1Hyundaii4001/01/9931/12/17
PARTNO2HyundaiAccent01/01/9431/12/99
PARTNO2SubaruImpreza01/01/9331/12/98
PARTNO2ToyotaCelica01/01/9531/12/01
PARTNO3ToyotaCelica01/08/9431/05/02
PARTNO3ToyotaMR201/01/9131/12/01

<tbody>
</tbody>


Using this fine thread I have the necessary code to put all applications on one line and also on how to seperate Column 2.
But...how would I incorporate the date? So based on the above sample, the output would be as follows:


PARTNO1Hyundai Accent, i30, i40 01/94>12/17
PARTNO2Hyundai Accent 01/94>12/99. Subaru Impreza 01/93>12/98. Toyota Celica 01/95>12/01
PARTNO3Toyota Celica, MR2 08/94>05/02

<tbody>
</tbody>


Trying best to explain but basically it now groups up the dates by Car manufacturer (Column 2). So PARTNO1 is Hyundai with a minimum date value of 01/94 and a maximum date value of 12/17.
PARTNO2, Hyundai's Min and Max is 01/94>12/99 and so on.


Thank you for any help :)
 
Last edited:

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
42,956
Office Version
365
Platform
Windows
This is totally different question & needs a new thread please.
 

Watch MrExcel Video

Forum statistics

Threads
1,102,869
Messages
5,489,374
Members
407,686
Latest member
Chuck1960

This Week's Hot Topics

  • Timer in VBA - Stop, Start, Pause and Reset
    [CODE=vba][/CODE] Option Explicit Dim CmdStop As Boolean Dim Paused As Boolean Dim Start Dim TimerValue As Date Dim pausedTime As Date Sub...
  • how to updates multiple rows in muliselect listbox
    Hello everyone. I need help with below code. code is only chaning 1st row in mulitiselect list box. i know issue with code...
  • Delete Row from Table
    I am trying to delete a row from a table using VBA using a named range to find what I need to delete. My Range is finding the right cell. In the...
  • Assigning to a variable
    I have a for each block where I want to assign the value in column 5 of the found row to the variable Serv. [CODE=vba] For Each ws In...
  • Way to verify information
    Hi All, I don't know what to call this formula, and therefore can't search. I have a spreadsheet with information I want to reference...
  • Active Cell Address – Inactive Sheet
    How to use VBA to get the cell address of the active cell in an inactive worksheet and then place that cell address in a location on the current...
Top