PDA

View Full Version : Conditional wrap line - VBA Excel



rodrigowande
02-02-2016, 11:11 AM
Hi you all.

I have a PDF file when I copy and paste from PDF to Excel the wrap line occurs multiple times for each numerical.

Would be something like "if active cell [start with number and end with ;]"
the paste must be like green field as attached file:https://social.technet.microsoft.com/Forums/getfile/798003

Thanks in advance

SamT
02-02-2016, 11:14 AM
You marked this thread "Solved."
Do you still need help?

rodrigowande
02-02-2016, 11:44 AM
You marked this thread "Solved."
Do you still need help?

Hi my friend.

This is not solved. It was mistake. Can you help me?

Paul_Hossler
02-03-2016, 07:35 PM
Something like this





Option Explicit
Sub JoinLines()
Dim iRow As Long

Application.ScreenUpdating = False

With ActiveSheet
For iRow = .Cells(1, 1).CurrentRegion.Rows.Count To 2 Step -1
If Not IsNumeric(Left(.Cells(iRow, 1).Value, 1)) Then
.Cells(iRow - 1, 1).Value = .Cells(iRow - 1, 1).Value & " " & .Cells(iRow, 1).Value
.Rows(iRow).Delete
End If
Next iRow
End With

Application.ScreenUpdating = True
End Sub