Sub blah()
For Each cll In Range("F2:K11").Cells 'adjust yourself, works on the active sheet.
'For Each cll In Range("F18:K27").Cells
cll.FormatConditions.Delete
If Len(cll.Value) > 0 Then
With cll.FormatConditions.AddDatabar
.MinPoint.Modify newtype:=xlConditionValueNumber, newvalue:=0
.MaxPoint.Modify newtype:=xlConditionValueNumber, newvalue:=30
.BarFillType = xlDataBarFillSolid
If Len(cll.Offset(, 1).Value) > 0 Then .Direction = xlRTL ' else .Direction = xlLTR
End With
End If
Next cll
End Sub