The only way is to use a macro to set databar color individually.
Note: You will need to run macro again when data is updated.
Sub ApplyConditionalDataBars()
Dim cell As Range
Dim dataBar As dataBar
' Loop through each cell in the range A2:A10
For Each cell In Range("A2:A10")
' Clear existing conditional formatting
cell.FormatConditions.Delete
' Determine the color based on the cell's value
If cell.Value < 14 Then
' Add orange data bar
Set dataBar = cell.FormatConditions.AddDatabar
dataBar.BarColor.Color = RGB(255, 192, 0) ' Orange
ElseIf cell.Value >= 14 And cell.Value <18 Then
' Add yellow data bar
Set dataBar = cell.FormatConditions.AddDatabar
dataBar.BarColor.Color = RGB(255, 255, 0) ' Yellow
Else
' Add green data bar
Set dataBar = cell.FormatConditions.AddDatabar
dataBar.BarColor.Color = RGB(0, 176, 80) ' Green
End If
' Configure data bar settings
With dataBar
.MinPoint.Modify newtype:=xlConditionValueNumber, newvalue:=0
.MaxPoint.Modify newtype:=xlConditionValueNumber, newvalue:=18
.BarFillType = xlDataBarFillSolid
.AxisPosition = xlDataBarAxisNone ' Hide the axis
End With
Next cell
End Sub