Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hi All,
I am facing a problem in my coding
coding is:
For i = 2 To Sheet1.Range("a2").End(xlDown).Row
If Sheet1.Range("G" & i).Value <= 2.5 Then
Sheet1.Range("H" & i).Value = 5
ElseIf Sheet1.Range("G" & i).Value > 2.5 And Sheet1.Range("G" & i).Value <= 3# Then
Sheet1.Range("H" & i).Value = 4.5
ElseIf Sheet1.Range("G" & i).Value > 3# And Sheet1.Range("G" & i).Value <= 3.5 Then
Sheet1.Range("H" & i).Value = 4
ElseIf Sheet1.Range("G" & i).Value > 3.5 And Sheet1.Range("G" & i).Value <= 4# Then
Sheet1.Range("H" & i).Value = 3.5
ElseIf Sheet1.Range("G" & i).Value > 4# And Sheet1.Range("G" & i).Value <= 4.25 Then
Sheet1.Range("H" & i).Value = 3
ElseIf Sheet1.Range("G" & i).Value > 4.25 And Sheet1.Range("G" & i).Value <= 4.5 Then
Sheet1.Range("H" & i).Value = 2
ElseIf Sheet1.Range("G" & i).Value > 4.5 Then
Sheet1.Range("H" & i).Value = 1
End If
Next
In this coding when I enter 3.00 or 4.00 it converts it in 3# or 4# and the second thing is I want to write it with % sign like 3.00%, it is not accepting it. Is there any other way to code it.
Please help me out.
Thanks
Shweta
I am facing a problem in my coding
coding is:
For i = 2 To Sheet1.Range("a2").End(xlDown).Row
If Sheet1.Range("G" & i).Value <= 2.5 Then
Sheet1.Range("H" & i).Value = 5
ElseIf Sheet1.Range("G" & i).Value > 2.5 And Sheet1.Range("G" & i).Value <= 3# Then
Sheet1.Range("H" & i).Value = 4.5
ElseIf Sheet1.Range("G" & i).Value > 3# And Sheet1.Range("G" & i).Value <= 3.5 Then
Sheet1.Range("H" & i).Value = 4
ElseIf Sheet1.Range("G" & i).Value > 3.5 And Sheet1.Range("G" & i).Value <= 4# Then
Sheet1.Range("H" & i).Value = 3.5
ElseIf Sheet1.Range("G" & i).Value > 4# And Sheet1.Range("G" & i).Value <= 4.25 Then
Sheet1.Range("H" & i).Value = 3
ElseIf Sheet1.Range("G" & i).Value > 4.25 And Sheet1.Range("G" & i).Value <= 4.5 Then
Sheet1.Range("H" & i).Value = 2
ElseIf Sheet1.Range("G" & i).Value > 4.5 Then
Sheet1.Range("H" & i).Value = 1
End If
Next
In this coding when I enter 3.00 or 4.00 it converts it in 3# or 4# and the second thing is I want to write it with % sign like 3.00%, it is not accepting it. Is there any other way to code it.
Please help me out.
Thanks
Shweta