.
Click the link, and follow the 'bouncing ball' for download .... (not literally).
It will do what you were asking. Can't promise the label will be able to accept everything you are wanting it to. You may need to adjust the Font size and/or spacing.
Experiment and see.
.
Click the link, and follow the 'bouncing ball' for download .... (not literally).
It will do what you were asking. Can't promise the label will be able to accept everything you are wanting it to. You may need to adjust the Font size and/or spacing.
Experiment and see.
Option Explicit
Sub test1()
Dim i As Long
Dim Last As Long
Dim Rng As Range
Dim Txt As String
On Error Resume Next
Txt = Application.ActiveWindow.RangeSelection.Address
Set Rng = Range("A1:A150") '<<----------------------------Change range of rows here
If Rng Is Nothing Then Exit Sub
Application.ScreenUpdating = False
Last = Rng.Rows.Count
For i = Last To 1 Step -1
If InStr(1, Rng.Cells(i, 1).Value, "Team") > 0 Then
Rows(Rng.Cells(i, 1).Row).Insert shift:=xlDown
End If
Next
Application.ScreenUpdating = True
FindBlankAndFill
End Sub
Sub FindBlankAndFill()
Dim cnter As Integer
Dim lastRow As Long
Dim i As Integer
lastRow = Cells(Rows.Count, 1).End(xlUp).Row
cnter = 0
Application.ScreenUpdating = False
For i = 8 To lastRow + 1
If IsEmpty(Cells(i, 1)) Then
Cells(i, 1).RowHeight = 40
Cells(i, 1).Value = " Text 1" & vbCrLf & " Text 1a" & vbCrLf & " Text 1b" '<<------------------ Edit text comment here for Col A
Cells(i, 4).Value = " Text 2" & vbCrLf & " Text 2a" & vbCrLf & " Text 2b" '<<------------------ Edit text comment here for Col DA
cnter = cnter + 1
End If
Next i
Range("A2").Select
Selection.EntireRow.Delete
Application.ScreenUpdating = True
End Sub
.
Download workbook with changes : https://www.amazon.com/clouddrive/share/edlionTVx9BxdhC2KYJfYzkxSV8mCWVYiUGd2cAoeM3
New code :
Code:Option Explicit Sub test1() Dim i As Long Dim Last As Long Dim Rng As Range Dim Txt As String On Error Resume Next Txt = Application.ActiveWindow.RangeSelection.Address Set Rng = Range("A1:A150") '<<----------------------------Change range of rows here If Rng Is Nothing Then Exit Sub Application.ScreenUpdating = False Last = Rng.Rows.Count For i = Last To 1 Step -1 If InStr(1, Rng.Cells(i, 1).Value, "Team") > 0 Then Rows(Rng.Cells(i, 1).Row).Insert shift:=xlDown End If Next Application.ScreenUpdating = True FindBlankAndFill End Sub Sub FindBlankAndFill() Dim cnter As Integer Dim lastRow As Long Dim i As Integer lastRow = Cells(Rows.Count, 1).End(xlUp).Row cnter = 0 Application.ScreenUpdating = False For i = 8 To lastRow + 1 If IsEmpty(Cells(i, 1)) Then Cells(i, 1).RowHeight = 40 Cells(i, 1).Value = " Text 1" & vbCrLf & " Text 1a" & vbCrLf & " Text 1b" '<<------------------ Edit text comment here for Col A Cells(i, 4).Value = " Text 2" & vbCrLf & " Text 2a" & vbCrLf & " Text 2b" '<<------------------ Edit text comment here for Col DA cnter = cnter + 1 End If Next i Range("A2").Select Selection.EntireRow.Delete Application.ScreenUpdating = True End Sub
Hopefully someone else can assist with concatenating the players names.