|Hi All - I have tried and failed multiple times at writing a potential code and have looked extensively across the web for help on this question and have found no answer: I hope somebody will be able to help me!|
I am trying to create a SUMIF VBA code which leverages a dynamic, unique list from column L in sheet1 as its criteria and columns E and I in sheet2 as its range and sum range. I want to have the answer for the SUMIF code populate in column M next to the unique list in sheet1.
The amount of rows in each of the aforementioned columns are subject to change daily, so I know I need to include some sort of step or loop function to go through each value in my unique list. The file would look like such:
Sheet1: Sheet 2:
L M E I
1 $10 1 $3
2 $20 1 $7
3 $30 2 $17
I realize that this would be a very easy formula to write in excel and copy down for each unique value:
(Cell M3 =sumif(sheet2!$E$4:$E$65536,sheet1!L3,sheet2!$I$4:$I$65536)
Unfortunately, I am worried about the excel savvy of its potential end user - which makes writing a VBA macro a must.
Can anyone help me?? Please feel free to ask me any questions if I was not clear