Get row number corresponding to the first and last number in a series of repeating numbers (in a column)
Whew, that may have been a confusing title. Please don't be discouraged by my long post. It's mostly me just being thorough for you :D
I have a bunch of dates in a column. In column C is a function that simply returns the month number of the cell in column B from the same row. Now, I would like to use a function to tell me the position (row numbers) of the first and last number of a specified month. For example, I may only be interested in 3 (March). So I only want to know the row numbers of when March dates begin and end. How can I achieve this?
I initially tried using the MATCH function where the [matching-method] is set to [find largest value (1)] and [find smallest value (-1)] to tell me the first and last positions but this for some reason returned positions of different results that I wasn't even looking for (for example, saying a position for "2" when "2" wasn't even in the list- in other words, no dates for Feb were even in the list).
Alternatively, maybe someone can help me with my specific need. I am trying to find the first and last numbers (columns D and E in the image below) for a specified month. Each individual row has a specific date with a starting and ending number for that date. Therefore, I would like a function to tell me the first number from February, for example, and also the last number from February (just tell me the row numbers). This is where I tried using the match function I described above. Maybe I'm over thinking how to do this and don't need to use the month numbers column to achieve this?