Hello,
I'm trying to improve on a code. This code worked with one column
Sub Macro1()
With Sheets("Result")
iLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
For i = 3 To iLastRow
.Cells(i, "C").Value = Evaluate("=SUMIF(Data!$B$2:$B$9,Result!$B" & i & "&Result!" & "C$1,Data!$C$2:$C$9)")
'
Next i
End With
End Sub
, but I'm having a difficult time (better yet, no idea) including the column.
I posted a the formula similar to this one on another forum a few weeks ago:
=SUMIF(Data!$B$2:$B$9,Result!$B3&Result!C$1,Data!$C$2:$C$9)
and this is the code I conjured up:
Sub Macro1()
With Sheets("Result")
iLastRow = .Cells(.Rows.Count, "B").End(xlUp).Row
For i = 3 To iLastRow
With Sheets("Result")
aLastColumn = .Cells(.Columns.Count, "1").End(xlRight).Column
For a = 2 To aLastColumn
.Cells(i, "C").Value = Evaluate("=SUMIF(Data!$B$2:$B$9,Result!$B" & i & "&Result!" & a & "1,Data!$C$2:$C$9)")
'
Next i
Next a
End With
End With
End Sub
But I'm far from being a wizard, and it failed.
Can someone provide me with a solution, and tell me what is wrong with my logic?
How long will it take so this icon won't be my mantra any more?
Thanks,
Xrull