I have a data set of
column 1 = activity ID
column 2 = accepted/rejected (value is either "R" or "A")
column 3 = accept (value is either "A" or left blank)
column 4 = sum of hours (numerical value of hours)
what I need is to generate a sum with one or more criteria for the activity ID
sum 1 = sum of hours where column 2 = "R"
sum 2 = sum of hours where column 2 = "R" and column 3 = "A"
sum 3 = sum of hours where column 2 = "R" and column 3 = blank or null