I have two bits of codes that work seperatley, but I can't figure out how to combine them. I want to go through a column of numbers and test if they are >= 100 and then change the result if true.
I don't know how many rows this column will be so I have used the following line in another part of this Macro.
Range("D1:D" & Final & "").
And I have successfully tested a single cell by directly specifiying it like so:
Sub CellTest()
Dim cell As Integer
cell = Range("D7").Value
If cell >= 100 Then
Range("D7").Value = "NoSplit"
End If
End Sub
Can anybody help me combine these so it iterates through every row and tests the value?
Update:
This spreadsheet is downloaded via a script on a webpage and has a different name each time. There are a few things I will know ahead of time such as...
- There is only 1 sheet
- The column in question is column D
- column D will only have numbers with no decimal points
- I will not know how many rows in this column ahead of time