Good morning all,
I have an excel formula question that has been stumping me this morning.
My data: A list of all employee travels for a one year period, including traveler name, travel departure date, whether the trip occurred or was cancelled (authorization status), and cost of travel. If an employee travel three times in a year, there is a separate row for each of the 3 trips.
My desires (more like my bosses desires) are: Two Formula 1) Find the traveler who averages the highest cost per trip during a given time frame, such as, during the month of January. 2) How much is his/her average cost per trip during that time frame.
I have created a formula that finds which employee travels most, but I'm not sure how to transition this to who has the highest average. Anyone want to take a stab at it? Any and all help is appreciated.
Formula for who travels the most:
{=(INDEX(data[Traveler Name],MATCH(MAX(FREQUENCY(IF((data[Depart]<=1/31/13)*(data[Depart]>=1/1/13)*(data[Authorization Status]<>"Cancelled"), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]), ""), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]))), FREQUENCY(IF((data[Depart]<=1/31/13)*(data[Depart]>=1/1/13)*(data[Authorization Status]<>"Cancelled"), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]), ""), COUNTIF(data[Traveler Name], "<"&data[Traveler Name])), 0)))}
I have an excel formula question that has been stumping me this morning.
My data: A list of all employee travels for a one year period, including traveler name, travel departure date, whether the trip occurred or was cancelled (authorization status), and cost of travel. If an employee travel three times in a year, there is a separate row for each of the 3 trips.
My desires (more like my bosses desires) are: Two Formula 1) Find the traveler who averages the highest cost per trip during a given time frame, such as, during the month of January. 2) How much is his/her average cost per trip during that time frame.
I have created a formula that finds which employee travels most, but I'm not sure how to transition this to who has the highest average. Anyone want to take a stab at it? Any and all help is appreciated.
Formula for who travels the most:
{=(INDEX(data[Traveler Name],MATCH(MAX(FREQUENCY(IF((data[Depart]<=1/31/13)*(data[Depart]>=1/1/13)*(data[Authorization Status]<>"Cancelled"), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]), ""), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]))), FREQUENCY(IF((data[Depart]<=1/31/13)*(data[Depart]>=1/1/13)*(data[Authorization Status]<>"Cancelled"), COUNTIF(data[Traveler Name], "<"&data[Traveler Name]), ""), COUNTIF(data[Traveler Name], "<"&data[Traveler Name])), 0)))}