dragonfire33
Board Regular
- Joined
- Oct 7, 2021
- Messages
- 90
- Office Version
- 365
- Platform
- Windows
The idea that you raised is the 2nd process to carry out since the first process works in sheet 2 concatenating the cells from the left area to the right area I attach a possible code but it does not work perfectly for me, can you do me the favor of modifying it and if suddenly append a code to send the data to the 2nd sheet, I would greatly appreciate the attachment of the first process code
VBA Code:
Sub Columnas()
On Error Resume Next
Application.ScreenUpdating = False
Range([AZ1].End(xlToLeft), [A1]).SpecialCells(xlCellTypeBlanks).EntireColumn.Delete
F = [A1].CurrentRegion.Rows.Count
G = [A1].CurrentRegion.Columns.Count
For J = 1 To G
For i = 1 To F
For x = 1 To Len(Cells(i, J))
Y = Y & Mid(Cells(i, J), x, 1) & " "
Next x
Cells(i, J + 200) = Trim(Y): Y = "":
Next
Columns("AA:>N").Delete Shift:=xlToRight
Next
Range([AA1].End(xlToRight).Offset(0, -1), [AA1]).EntireColumn.Delete
FF = [A1].CurrentRegion.Rows.Count
GG = [A1].CurrentRegion.Columns.Count * 4
For Z = 0 To GG - 4 Step 4
Range(Cells(FF, Z + 27), Cells(2, Z + 27)).Borders.Item(xlEdgeLeft).LineStyle = xlContinuous
Range(Cells(FF, Z + 27), Cells(2, Z + 27)).TextToColumns Destination:=Cells(2, Z + 27), DataType:=xlDelimited, ConsecutiveDelimiter:=True, Other:=True, OtherChar:=" "
Next
With [AA1:CZ1]: .ColumnWidth = 3: .HorizontalAlignment = xlLeft: End With
Application.ScreenUpdating = True
End Sub
[URL='https://foro.todoexcel.com/threads/concatenear-datos-en-hoja-2-y-enviar-a-hoja-1.59214/reply?quote=257927']Responder[/URL]
[URL='https://foro.todoexcel.com/posts/257927/report']Reportar[/URL] [URL='https://foro.todoexcel.com/posts/257927/edit']Editar[/URL]