General discussion
Thread display: Collapse - |
All Comments
Start or search
Create a new discussion
If you're asking for technical help, please be sure to include all your system info, including operating system, model number, and any other specifics related to the problem. Also please exercise your best judgment when posting in the forums--revealing personal information such as your e-mail address, telephone number, and address is not recommended.
CONCATENATE ROWS - EXCEL
COL A = PART NUMBER (one cell)
COL B = DESCRIPTION (from one to 7 cells in the column)
I need to make a VB macro which would allow me to concatenate all the cells in COL B into one cell, while referencing the individual part number in COL A.
The following Macro works some...but not OK
Sub ConcatColumns ()
Do While ActiveCell <> "" 'Loops until the active cell is blank.
'The "&" must have a space on both sides or it will be treated
'as a variable type of long integer.
ActiveCell.Offsett(0, 1).FormulaR1C1 = _
ActiveCell.Offsett(0, -1) & " " & ActiveCell.Offsett(0, 0)
ActiveCell.Offsett(1, 0).Select
Loop
End Sub
What happens is that I cannot
a)
get all the cells in COL B (for Description) relating to any ONE PART Number (in COL A) to be specifically concatenated into COL C,in one cell.
b)
ex