concatenate data in sheet 2 and send to sheet 1

dragonfire33

Board Regular
Joined
Oct 7, 2021
Messages
52
Office Version
  1. 365
Platform
  1. 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]
 

Attachments

  • 23.png
    23.png
    161.8 KB · Views: 10

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,214,976
Messages
6,122,543
Members
449,089
Latest member
davidcom

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top