In the example below I am trying to create a macro that will calculate the time difference between the Column A value in the first row where a new number appears in Column C with the Column B value in the Row for that same number (Column C) where Column D is equal to "ordered". I need to calculate this value for all values in Column C and then find the average value of those results. Any help would be greatly appreciated. Thanks!

11.jpg