0

I have a working macro that does this, but I am looking for a loop code that can simplify this for me. The text/variables I have in a named range but I am unsure of how to implement that into the code. In this portion, Highlander would change to other names that I have in said range.

Sub EnterSheet()
    Range("B1").Select
    With ActiveCell
        .Value = "Highlander" & .Value
        With .Characters(1, 8).Font
            Call Copy
            Sheets("Overview").Select
            Range("B1").Clear
        End With
    End With
End Sub
zedfoxus
  • 32,227
  • 4
  • 59
  • 60
Prattso
  • 3
  • 1
  • `Range("B1").Value = myvariable` where `myVariable` contains a string. Side not: you want to [avoid using Select](https://stackoverflow.com/questions/10714251/how-to-avoid-using-select-in-excel-vba) in your code – cybernetic.nomad Jun 02 '22 at 15:30
  • @cybernetic.nomad This does not seem to work for my instance – Prattso Jun 03 '22 at 12:11

0 Answers0