I am trying to test to see if a variable (number in an excel cell) is greater than 0. I have two variables being tested against one another and then tested to see if it is greater than 0. The test between the two variables works, but then when I test if it is greater than or less than 0 it skips right over it. I believe it is the way I have defined them? But when I try and define them as an integer or does not work either. Can someone please help with what I am missing? Thank you in advance for your help... I appreciate it.
Sub BA()
Dim Sh As Worksheet
Dim Skill As Range
Dim Allocation As Range
Dim Selection As Range
Dim SelectionText As String
Dim AllocationText As String
Dim AllocationDetract As String
Dim SelectionDetract As String
Dim SelectionLess As String
Dim AllocationLess As String
Dim AllocationContr As Double
Dim SkillContr As Double
SelectionText = " Text 1 "
AllocationText = " Text 2 "
SelectionLess = " Text 3"
SelectionDetract = "Text 4"
AllocationDetract = "Text 5."
AllocationLess = " Text 6"
For Each Sh In ThisWorkbook.Worksheets
With Sh.UsedRange
Set Skill = .Cells.Find(What:="Skill")
Set Allocation = Skill.Offset(15, 1)
Set Selection = Skill.Offset(15, 0)
AllocationContr = CDbl(Allocation)
SkillContr = CDbl(Selection)
If AllocationContr > SkillContr Then
If SkillContr > 0 Then
Range("B1").Value = Range("B1") & AllocationText &
SelectionLess
ElseIf SkillContr < Test Then
Range("B1").Value = Range("B1") & AllocationText &
SelectionDetract
End If
End If
If AllocationContr < SkillContr Then
If AllocationContr > 0 Then
Range("B1").Value = Range("B1") & SelectionText &
AllocationLess
ElseIf AllocationContr < 0 Then
Range("B1").Value = Range("B1") & SelectionText &
AllocationDetract
End If
End If
End With
Set Skill = Nothing
Next
End Sub