Hi!
I want to make a code in vba in wich the user selects a range of only one row and as many columns as he wants.
In the range the user selects, the code must sum the square of the first number, then the third, the fifth and so on (2 by 2)...
The result of this code has to appear exactly below the end of the range the user selected.
The code so far:
Sub Range()
Set MyRange = Application.InputBox("Set Range", Type:=8)
MyRange.Select
ActiveCell.Offset(MiRango.Count, -1) = "Sum"
n = ActiveCell.CurrentRegion.Rows.Count
End Sub
Thanks!
I want to make a code in vba in wich the user selects a range of only one row and as many columns as he wants.
In the range the user selects, the code must sum the square of the first number, then the third, the fifth and so on (2 by 2)...
The result of this code has to appear exactly below the end of the range the user selected.
The code so far:
Sub Range()
Set MyRange = Application.InputBox("Set Range", Type:=8)
MyRange.Select
ActiveCell.Offset(MiRango.Count, -1) = "Sum"
n = ActiveCell.CurrentRegion.Rows.Count
End Sub
Thanks!