I have 2 columns of data, Y & Z; they are times of goals scored. I want to create a column which will compare the data in those 2 columns and tell me whether the Home or Away team scored first. The issue I have is that many games do not simply have 1 goal, or 1 goal from each team. Often one team will have multiple goals as will the other.
Here is how the cells look right now if multiple goals
Y Z
23; 44; 72 12; 37
So, in this situation, Z had the earliest goal at 12, so Away is what I would want to see.
I can write a simple
but how to have the formula compare only the first number in each cell? When I run it now, 65; 73 in Y and 85 in Z tells me Away scored first, when clearly Home scored in the 65th minute
Is there a way for Excel to compare only the first number in each cell?
cheers
Here is how the cells look right now if multiple goals
Y Z
23; 44; 72 12; 37
So, in this situation, Z had the earliest goal at 12, so Away is what I would want to see.
I can write a simple
VBA Code:
=IF(Y2<Z2,"HOME","AWAY)
Is there a way for Excel to compare only the first number in each cell?
cheers