just to explain my code further
the "i" in my code represents the "current" row
For i = 1 To ActiveSheet.UsedRange.Rows.Count
so it starts from row one (i = 1) and loops until "ActiveSheet.UsedRange.Rows.Count" which should represent your last row
this helps a bit in the code running faster so it doesnt loop for million+ rows
syntax for cells (rows,columns)
so this line
If Cells(i, 1) = "Close" Then
looks at column 1 which is A
i = 1 then a1, i = 2 then a2, i = 3 then a3....etc
rest of the code is self explanatory
Range(Cells(i, 2), Cells(i, 5)).Value = Range(Cells(i, 2), Cells(i, 5)).Value
this just copies the value and replaces with value ...its another way of doing pastespecial - values
Bookmarks