Double value in cell and conditional formatting on one

jdskousen

New Member
Joined
Jun 7, 2024
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I am trying to build a roadmap staff capacity planner. I am trying to have conditional formatting based on a text value to color code the various project phases. We may need to allocate less staff during planning and warranty vs execution.
I want to be able to quickly layout the project phases (based on the color formatting from the text) but at the same time have the number of FTEs required as the main data point. Is there a way to have a layer within a cell to have both text and number where the conditional formatting is based on the text value but display the number value.

Attached is a screenshot and example workbook for reference.
 

Attachments

  • Screenshot 2024-06-07 130059.png
    Screenshot 2024-06-07 130059.png
    51.8 KB · Views: 10

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.
I do not believe you can achieve this with just conditional formatting, though some VBA should be able to get you what you want.
 
Upvote 0
I do not believe you can achieve this with just conditional formatting, though some VBA should be able to get you what you want.
Thanks. I am not a heavy coder nor every really ever tried VBA. Any good sources you recommend to see how complicated that would be?
 
Upvote 0
Something like this perhaps:
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C11:X12")) Is Nothing Then
Application.ScreenUpdating = False
    Select Case Target.Value
        Case "s"
            With Target.Interior
                .Interior.Pattern = xlSolid
                .Interior.PatternColorIndex = xlAutomatic
                .Interior.ThemeColor = xlThemeColorLight2
                .Interior.TintAndShade = 0.749992370372631
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "r"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent2
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "p"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent4
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "d"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent6
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "w"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .Color = 16764108
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case Else
            'Do Nothing
    End Select
Application.ScreenUpdating = True
End If
End Sub

I'm not sure why the selection bounces back and forth afterwards, but it gets the job done.
 
Upvote 0
Posted the wrong code above.
VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("C11:X12")) Is Nothing Then
Application.ScreenUpdating = False
    Select Case Target.Value
        Case "s"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorLight2
                .TintAndShade = 0.749992370372631
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "r"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent2
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "p"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent4
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "d"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .ThemeColor = xlThemeColorAccent6
                .TintAndShade = 0.599993896298105
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case "w"
            With Target.Interior
                .Pattern = xlSolid
                .PatternColorIndex = xlAutomatic
                .Color = 16764108
                .TintAndShade = 0
                .PatternTintAndShade = 0
            End With
            Target.ClearContents
        Case Else
            'Do Nothing
    End Select
Application.ScreenUpdating = True
End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,171
Members
453,021
Latest member
Justyna P

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