Hello,
I am brand new to VBA and have only gotten this far through some Google searches and a compilation of my research. The code below will work on my first row of data, but I need to expand the loop to work through all rows (my data runs Row 8 through Row 744). My spreadsheet is very busy, but the main columns of concern are BC and BE. Column BE = ( AW / (AZ + BC) ) where AW & AZ are values and I add one by one (1+1...) to BC until it brings BE to be < = 326.49. Again, the below code works for my data in Row 8, but how do I expand it so it does the same loop in BC9:BC744?
Private Sub CommandButton1_Click()
If Range("BE8").Value > 326.49 Then
Range("BC8").Value = 1
End If
If Range("BE8").Value > 326.49 Then
Do Until Range("BE8").Value < 326.49
Range("BC8").Value = Range("BC8").Value + 1
Loop
End If
End Sub
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
THANK YOU for consideration!
Bookmarks