Hello All,
I am pretty good with excel but am only just getting in to VBA codes and macros and so I was hoping that someone can help me with my problem below.
I have a list of people in D4:D21 and next to them I have the hours that they worked (so Week 1 is column E, Week 2 Column F, etc...).
I have figured out the code which will let me 'sumif' the hours in C25:C29 based on the person specified in B25:B29. This code is as follows:
Sub SUMIF_LOOP()
i = 25
Do While Range("B" & i).Value <> ""
Range("c" & i).Formula = Application.SumIf(Range("D:D"), Range("B" & i), Range("E:E"))
i = i + 1
Loop
End Sub
Can any please help improve this code so that after it loops through Column E and provides the answer in column C, it will repeat the sumif process through Column F and place the answer in Column D?
Thanks i advance,
Simon
Bookmarks