-
To Fix what you have:
[vba]
For i = 1 To 28
If (Cells(i, "F") = "Hat" Or Cells(i, "F") = "Shoe") And Cells(i, _
"M").NumberFormat = "0.0" Then
Cells(i, "M").Interior.ColorIndex = 6 'search for PatternColorIndex
Cells(i, "M").NumberFormat = "# ??/??" '10.75 displays as 10 3/4
If Cells(i, "M").Value - Int(Cells(i, "M").Value) Then
Cells(i, "M").Value = Cells(i, "M").Value / 2
End If
End If
Next i
[/vba]
This will make it check for "Hat" or "Shoe" and the number format has to be "0.0". "0.00" will not get picked up. Then it change the format to "# ??/??" for a fractional display and divides the value by 2 if there is a value in Column "M" that has a decimal value.
EDIT: Didn't finish the post before I submit LOL
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules