simple take 1 off of everything.
Sub Button1_Click()
Dim rngSwap As Range
Dim lngIndex As Long
Dim vntValue As Variant
Set rngSwap = ActiveSheet.Range("K1,K5,K9")
vntValue = rngSwap.Areas(3).Cells(1).Value
For lngIndex = 1 To 1
rngSwap.Areas(lngIndex).Cells(1).Value = rngSwap.Areas(lngIndex + 1).Cells(1).Value
Next
rngSwap.Areas(2).Cells(1).Value = vntValue
End Sub
And this should be flexible enough to handle multiple areas where the last always contains the formula. Just update the cell names.
Sub Button1_Click()
Dim rngSwap As Range
Dim lngIndex As Long
Dim vntValue As Variant
Set rngSwap = ActiveSheet.Range("K1,K5,K9")
vntValue = rngSwap.Areas(rngSwap.Areas.Count).Cells(1).Value
For lngIndex = 1 To rngSwap.Areas.Count - 2
rngSwap.Areas(lngIndex).Cells(1).Value = rngSwap.Areas(lngIndex + 1).Cells(1).Value
Next
rngSwap.Areas(rngSwap.Areas.Count - 1).Cells(1).Value = vntValue
End Sub
Bookmarks