Guzzlr
Well-known Member
- Joined
- Apr 20, 2009
- Messages
- 982
- Office Version
- 2021
- Platform
- Windows
Code:
For i = 9 To LastRow
If UCase(Cells(i, "F")) <> "CL" Or UCase(Cells(i, "F")) <> "CLOSED" _
And Cells(i, "B").Value = 100 Then
Cells(i, "B").Value = 99 _
And Cells(i, "E").Formula = "=(E-.3)"
End If
Next i
Hello All...
I have a little problem here.
What I'm trying to accomplish, is for the macro to not find either "CL" or "CLOSED" (upper case should not matter) in column "F" and a 100% in column "B", and changing 100% in Column "B" to a 99%, and then subtracting a .3 from the number in Column E...one row at a time.
The loop is working correctly.
Column "B" is formatted previously with:
Code:
With Range("B9:B6000")
.Formula = "=1-(C9/D9)"
.NumberFormat = "0%"
End With
What's happening, is every cell in Column "B", as the loop moves row-to-row, changes the number in column "B", regardless if it's 100% to 0%, and Column "E" number is not getting .3 subtracted.
Where am I going wrong this time!
Thanks for the help
excel 2013
Last edited: