I have a workbook with Sheet 1 contains names in A2:A100 and Months dates in B1:B12. Sheet 2 has sales figures with monthly dates in A:A, total sales in B:B and the sales name in C:C. The same person may have multiple sales in the same month on different lines.
I need a VBA procedure that will do an if statement that will total the sales for each name and return the results to sheet 1. For instance, if sheet 1 A2 has Randy and B1 has June, I need a VBA procedure to return the total sales for Randy in cell B2 and loop thru the names A2:A10 and return the values. And then do the same for the next month, in this case for Randy it would be in C2 for July. So, I'd need some type of offset.
Currently, I have if formulas to do this, but I'd like this to run in VBA to post only values and speed the process. Any help would be greatly appreciated.
I need a VBA procedure that will do an if statement that will total the sales for each name and return the results to sheet 1. For instance, if sheet 1 A2 has Randy and B1 has June, I need a VBA procedure to return the total sales for Randy in cell B2 and loop thru the names A2:A10 and return the values. And then do the same for the next month, in this case for Randy it would be in C2 for July. So, I'd need some type of offset.
Currently, I have if formulas to do this, but I'd like this to run in VBA to post only values and speed the process. Any help would be greatly appreciated.