Please help!
I'm a newbie to all this and am struggling to write a function that will split a range into two and multiply the corresponding ranges together. I'm sorry the descritpion isn't any better but I don't know how better to explain it. Basically, I have this ugly formula being run at the moment:
=B8*C8+D8*E8+F8*G8+H8*I8+J8*K8+L8*M8+N8*O8+P8*Q8+R8*S8+T8*U8+V8*W8+X8*Y8
And attempted to write a new function (that isn't working) that looks like this:
Function SumParallelColumn(range As range) As Integer
Dim x As Integer
Dim even As New Collection
Dim odd As New Collection
Dim sum As Integer
sum = 0
x = -1
For Each cell In range
x = x + 1
If x Mod 2 = 0 Then
even.Add CInt(cell.Value)
Else
odd.Add CInt(cell.Value)
End If
Next cell
x = 0
For x = 0 To even.Count
MsgBox (even.Item(x))
Next x
SumParallelColumn = 53
End Function
Any help would be awesome and if I could provide any further information, just ask.
Thanks!
Bookmarks