Adding text

Lowggy

New Member
Joined
Mar 3, 2018
Messages
39
I have an Excel spreadsheet generated from another program. It is set up so I can print it out on Avery labels but I missed one piece of information I want to add to every block of data. How can I do that in Excel.
thanks in advance.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
.
All depends on how the data is laid out in your spreadsheet. Not enough information so far to provide an answer.

You can add an image of your sheet in your next post. Make sure it shows everything you presently are working with.
You can also post a copy of your workbook (leave out any confidential info) to a CLOUD site like DROPBOX.COM, Google has a cloud site, Amazon has a cloud site, etc.

Having a copy of your workbook would be best. Reduces the asking of questions back and forth.
 
Upvote 0
Attached is a copy of my file. It may vary a bit so that I can fit it into a printout with avery forms. What I want to do is add a sentence in an area below the cells that have the time and total of handicaps but I want to do it once and have it show up under all the time stamps.


[TABLE="width: 810"]
<tbody>[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Team #1[/TD]
[TD] Hcp[/TD]
[TD][/TD]
[TD][/TD]
[TD] Team #2[/TD]
[TD] Hcp[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] ALFORD, JIM*[/TD]
[TD] 8[/TD]
[TD][/TD]
[TD][/TD]
[TD] ALMASI, CAROL*[/TD]
[TD] 15[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] ALFORD, RUTH*[/TD]
[TD] 15[/TD]
[TD][/TD]
[TD][/TD]
[TD] ALMASI, DENNIS*[/TD]
[TD] 6[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] GALLO, JERRY*[/TD]
[TD] 9[/TD]
[TD][/TD]
[TD][/TD]
[TD] KLIT, ESTHER*[/TD]
[TD] 17[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] REIER, PHYLISS*[/TD]
[TD] 17[/TD]
[TD][/TD]
[TD][/TD]
[TD] WEBER, HANK*[/TD]
[TD] 11[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Time: 09:15 am[/TD]
[TD] 49[/TD]
[TD][/TD]
[TD][/TD]
[TD] Time: 09:22 am[/TD]
[TD] 49[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Team #3[/TD]
[TD] Hcp[/TD]
[TD][/TD]
[TD][/TD]
[TD] Team #4[/TD]
[TD] Hcp[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] ANDRIOLA, BETTY*[/TD]
[TD] 16[/TD]
[TD][/TD]
[TD][/TD]
[TD] BERGERON, LESLIE*[/TD]
[TD] 7[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] BADGER, JIM*[/TD]
[TD] 15[/TD]
[TD][/TD]
[TD][/TD]
[TD] BERGERON, MAURICE*[/TD]
[TD] 16[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] BADGER, LYN*[/TD]
[TD] 11[/TD]
[TD][/TD]
[TD][/TD]
[TD] MOFFETT, GLENDA*[/TD]
[TD] 14[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] FULMER, DAVE*[/TD]
[TD] 8[/TD]
[TD][/TD]
[TD][/TD]
[TD] WALLER, ROY*[/TD]
[TD] 13[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD] Time: 09:30 am[/TD]
[TD] 50[/TD]
[TD][/TD]
[TD][/TD]
[TD] Time: 09:37 am[/TD]
[TD] 50[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


.
All depends on how the data is laid out in your spreadsheet. Not enough information so far to provide an answer.

You can add an image of your sheet in your next post. Make sure it shows everything you presently are working with.
You can also post a copy of your workbook (leave out any confidential info) to a CLOUD site like DROPBOX.COM, Google has a cloud site, Amazon has a cloud site, etc.

Having a copy of your workbook would be best. Reduces the asking of questions back and forth.
 
Upvote 0
.
I understand (can visualize) what you are working with now. However, without having the workbooks here to edit it's going to be impossible to provide any assistance.

The answer you are seeking may lie with the original program that is generating the spreadsheet. Or it may lie in the spreadsheet once the data is compiled there. Hard to tell.
I am presuming you have more than 4 labels to print ? The four you presented below are just an example of perhaps hundreds/thousands ?
 
Upvote 0
Yes it is a part of a list of 40 teams of 4somes. I just want to add some text to each group of 4 and have that text printed so I can hand it out to al, the groups. Is it better that I post the actual Excel spreadsheet in dropbox? How do I do that?
 
Upvote 0
.
I've never used DropBox but I'm certain it isn't difficult to use. I understand they have an app you download to your computer which makes it easier. Not certain if they provide a free version.

I know that Amazon has a free version - that's what I use. This is the link for signing up : https://www.amazon.com/b?ie=UTF8&node=15547130011
 
Upvote 0
Upvote 0
.
You can download the workbook here : https://www.amazon.com/clouddrive/share/fY9o0bsmjqai1aRoYDFXEpK3QcFVDBTrt4bmbeMlJcF

Here is the macro :

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).Value = " Text 1" '<<------------------ Edit text comment here for Col A
            Cells(i, 4).Value = " Text 2" '<<------------------ Edit text comment here for Col D
            cnter = cnter + 1
        End If
    Next i
    
    Range("A2").Select
    Selection.EntireRow.Delete
    
    Application.ScreenUpdating = True
End Sub
 
Last edited:
Upvote 0
.
You can download the workbook here : https://www.amazon.com/clouddrive/share/fY9o0bsmjqai1aRoYDFXEpK3QcFVDBTrt4bmbeMlJcF

Here is the macro :

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).Value = " Text 1" '<<------------------ Edit text comment here for Col A
            Cells(i, 4).Value = " Text 2" '<<------------------ Edit text comment here for Col D
            cnter = cnter + 1
        End If
    Next i
    
    Range("A2").Select
    Selection.EntireRow.Delete
    
    Application.ScreenUpdating = True
End Sub

Ok, I will try it when I figure out how to do it. Thank you very much. Can you tell me exactly what this code will do.
 
Upvote 0
.
Click the link, and follow the 'bouncing ball' for download .... (not literally).

Can you tell me exactly what this code will do.

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.
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

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