Hello all,
I spent all afternoon trying to figure out how to do this, but I couldn't. I am hoping someone out there can help!
Anyways, I have two columns of data that are date fields (E.g., Column A is when Event A occurred and Column B is when Event B occurred). Not all rows of subjects have both dates entered in. For example, Event A may have occurred for the subject on 12/12/2008, but Event B never occurred, so Column B is left blank for that subject. Some rows have two dates filled in. For example, Event A may have occurred on 8/21/2009 and Event B may have occurred on 7/27/2007.
I am trying to create and "IF" formula that will account for the following:
1.) If only one event occurred, the date of the event populates (e.g., Event A occurred on 12/12/2008, Event B never occurred so it's corresponding cell is left blank, so 12/12/2008 shows up in the cell that has the function entered in)
2.) If both events occurred, the date that the FIRST event occurred shows up in the cell that has the function entered. So, for example, Event A occurred on 8/21/2009 and Event B occurred on 7/27/2007, so 7/27/2007 shows up in the cell that has the function entered in.
Any help is greatly appreciated! I am about to pull out my hair.
Please do not double post. See forum rules.
If your question has been satisfactorily addressed, please consider marking it solved. Click here to see how.
Also, you might want to add to the user's reputation by clicking the scales icon - it's why we do what we do...
Thomas Lafferty
Analyst/Programmer
Sorry, I only double posted because it was brought to my attention that I had posted the original thread in the wrong forum.
Try using the formula for cell C2
=MIN(A2:B2)
with Assuming:
cell A2: the date of event A
cell B2: the date of event B
Copy fill down to C3,C4....
Best regard, -)iger-/iger
If you are pleased with a solution mark your post SOLVED.
That's a great suggestion; thank you! I will try it at work tomorrow. The only concern that I have is what is going to happen with the cells that are blank...i thought Excel read blank date fields as "0" (or 1/01/1900) and thus, the smallest value out of the two columns?
So for example, Column A is empty, but Excel reads it as "0"/ 1/01/1900 and Column B reads 2/25/2005, I want 2/25/2005 to show up in the formula cell, but since Excel is reading Column A as 1/01/1900, that value will show up in the formula cell.
Thanks again!
Don't worry about it because the MIN function in excel ignore the empty cell or cell containing the value "", the formula is tested for the cases by myself
Best regard, -)iger-/iger
If you are pleased with a solution mark your post SOLVED.
Thank you so much! Greatly appreciated.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks