+ Reply to Thread
Results 1 to 2 of 2

Changing font type based on conditional formatting

Hybrid View

  1. #1
    Registered User
    Join Date
    10-27-2008
    Location
    Richmond, VA
    Posts
    2

    Changing font type based on conditional formatting

    I am creating a monthly status report for project reporting. At the top of the report, we'll say cell A1, I want the user to have the ability to select via dropdown box whether the project is in green, yellow or red status.

    Here's the tricky part - I want the color status to be represented by a colored circle (lowercase L in Wingdings font).

    So is there any way I can have a dropdown box with the options, "G/Y/R", and then once the user makes their selection, change the cell contents to be a circle, colored appropriately based on whether the user selected G, Y or R?

    Thanks!

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Changing font type based on conditional formatting

    So is there any way I can have a dropdown box with the options, "G/Y/R", and then once the user makes their selection, change the cell contents to be a circle, colored appropriately based on whether the user selected G, Y or R?
    You can't do this with the standard Data Validation drop down and it can only be done using VBA code.

    If you can use a VBA solution then perhaps the attached will be helpful.
    In the attached workbook . . .
    An active-X combobox was created using a ListFillRange in column-K.
    The code targets column-A. If the activecell is in column-A, then the comboxbox is made visible and presents a choice of G/Y/R. Once the selection is made, the activecell is formatted to the wingding font using the applicable color.
    Option Explicit
    
    Private Sub ComboBox1_Change()
    
    With ActiveCell
        .Font.Name = "Wingdings"
        .Value = "l"
        Select Case Me.ComboBox1.Value
            Case "G": ActiveCell.Font.ColorIndex = 10
            Case "Y": ActiveCell.Font.ColorIndex = 6
            Case "R": ActiveCell.Font.ColorIndex = 3
        End Select
    End With
    
        Me.ComboBox1.Visible = False
    
    End Sub
    
    
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    
        If Target.Cells.Count > 1 Then Exit Sub
        
        If Not Intersect(ActiveCell, Range("A1:A10")) Is Nothing Then
            With Me.ComboBox1
                .Visible = True
                .Top = ActiveCell.Top
                .Left = ActiveCell.Left
            End With
        Else
            Me.ComboBox1.Visible = False
        End If
    
    End Sub
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1