Below is a cell formula that I have on a worksheet that I wanted to translate as VBA macro statement:
=(SUMIFS(RawData!$J:$J,RawData!$D:$D,C$4,RawData!$H:$H,">7/24/2015 08:00:00 PM",RawData!$H:$H,"<7/25/2015 12:16:00 PM"))
where: Each row in the data table is a unique dataset based on the date in the week
Column J in the data table contains the values to be summed
Column D in the data table has the values that describes type of data it is for that cell (sum only Type A product which is identified on Cell C$4 on the Summary Page)
Column H in the data table has the timestamps on when the event occurred that the particular product was processed. On the example above, the time range is looking for any event that happened between 08:00 PM 7/24/15 and 12:15 PM 7/25/15.
In short, the statement above is asking the sum of the values in Column J if it was a Type A product (Column D) processed after 08:00 PM on 7/24/15 AND before 12:15 PM on 7/25/15 (Column H). The cell formulas work in the worksheet. There are 5 different product types that I have to type in manually for the whole week so I need to programmatically calculate it where the dates will be stored variables depending on the week number.
Any help will be appreciated.
=(SUMIFS(RawData!$J:$J,RawData!$D:$D,C$4,RawData!$H:$H,">7/24/2015 08:00:00 PM",RawData!$H:$H,"<7/25/2015 12:16:00 PM"))
where: Each row in the data table is a unique dataset based on the date in the week
Column J in the data table contains the values to be summed
Column D in the data table has the values that describes type of data it is for that cell (sum only Type A product which is identified on Cell C$4 on the Summary Page)
Column H in the data table has the timestamps on when the event occurred that the particular product was processed. On the example above, the time range is looking for any event that happened between 08:00 PM 7/24/15 and 12:15 PM 7/25/15.
In short, the statement above is asking the sum of the values in Column J if it was a Type A product (Column D) processed after 08:00 PM on 7/24/15 AND before 12:15 PM on 7/25/15 (Column H). The cell formulas work in the worksheet. There are 5 different product types that I have to type in manually for the whole week so I need to programmatically calculate it where the dates will be stored variables depending on the week number.
Any help will be appreciated.