Boards
DiS VBA club
obviously i'm a master of excel but i'm now starting to learn VBA and really enjoying it. total beginner though, just did this
Sub ExchangeAllocation()
'
' ExchangeAllocation Macro
'
'
'
Range("A1").Select
ActiveCell.Offset(1, 0).Select
Selection.End(xlToRight).Select
ActiveCell.Offset(0, 1).Select
Sheets("Sheet2").Select
Range("E1:G1").Select
Selection.Copy
Sheets("Sheet1").Select
ActiveSheet.Paste
Columns("T:W").EntireColumn.AutoFit
ActiveCell.Offset(1, 0).Select
Do Until IsEmpty(ActiveCell.Offset(0, -11))
ActiveCell = WorksheetFunction.Average(Range(ActiveCell.Offset(0, -11), ActiveCell.Offset(0, -9))) * Range("T1")
Selection.NumberFormat = "0.00"
ActiveCell.Offset(1, 0).Select
Loop
End Sub
share with me your triumphs people!