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

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
.
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.


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

<tbody>
</tbody>


.
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,214,942
Messages
6,122,367
Members
449,080
Latest member
Armadillos

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