Change Cell Font Attributes (Col B) to be the Font Attribute Named in (Col A)

  • My daughter is making shirts for her cheerleading group. She would like to put the Font names in column A (Allstar) and in the offset column B have it change the font to that Font attribute name. She will have her wording in Cell B2 and will be an absolute . Therefore they can see what each style will look like.
    They might have as many as 50. Those girls can't ever agree on anything. lol

  • Strange ... to hear you've received a corrupted file ... since it is fine at my end ...:sniff:


    Code
    Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Column <> 1 Then Exit Sub
    If Target.Count > 1 Then Exit Sub
    ' To get Column A with Font selected in Column A
    Target.Font.Name = Target.Value
    ' To get Column B with Font selected in Column A
    Target.Offset(0, 1).Font.Name = Target.Value
    End Sub


    Just in case ... file attached a second time ...:wink:

  • The second file is corrupt also. How do I run the Private Sub?. I have never used Private or Public Macro's . I always hit F11 and post the attachment . I did that but I don't see it so I can run the macro. It does not appear in my macros

  • Got it. Could be better but it works. I set it to 50, perhaps a better way was to look for text in column, if not exit. Sub fontName()


    Dim i As Integer
    i = 2
    Do While i < 50


    ThisWorkbook.Worksheets("Sheet1").Cells(i, 2).Font.Name = Cells(i, 1)
    i = i + 1
    Loop


    End Sub

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!