# How to show earliest date from 2 separate rows

**URL:** <https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880>\
**Category:** Ask the Community\
**Created:** [December 1, 2020, 8:54pm UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880 "2020-12-01T20:54:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benn\_Bennett](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/benn_bennett/32/7017_2.png) [@Benn\_Bennett](https://connect.superhuman.com/u/Benn_Bennett)\
**Post date:** [December 1, 2020, 8:54pm UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880/1 "2020-12-01T20:54:48Z")

</div>

Hi! I want to show (and then sort later on) the earliest date of two.

The situation: I have dates that meetings are due, and dates that meetings are scheduled. I need to see both so that I know how to plan accordingly.

The table:  
Row Headers:  
Name | Due Date | Scheduled Date | Earliest  
Bob | 3/24/21 | [blank] | 3/24/21  
Sue | 2/24/21 | 1/24/21 | 1/24/21

I’m looking for the formula I’d need on the “Earliest” column, assuming there will be blanks.

Thanks!

---

<div class="post-metadata">

**Author:** ![Mario](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/mario/32/12232_2.png) [@Mario](https://connect.superhuman.com/u/Mario)\
**Post date:** [December 2, 2020, 11:51am UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880/2 "2020-12-02T11:51:09Z")

</div>

Hi @Benn_Bennett 🙂  
I think that a simple if \> would be enough for your case!  
Formulas in earliest column would be something like  
“If duedate\>scheduledate, duedate, scheduledate”  
It’s basically, if first is bigger write that, if not write the other

Can this solve the problem for you? 🙂

---

<div class="post-metadata">

**Author:** ![Nick\_HE](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/nick_he/32/6190_2.png) [@Nick\_HE](https://connect.superhuman.com/u/Nick_HE)\
**Post date:** [December 3, 2020, 4:16pm UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880/3 "2020-12-03T16:16:12Z")

</div>

To handle the blanks, tweak Mario’s approach with another check for blank scheduled date. The simple comparison will work in all situations except for “a blank schedule date with chosen due date.” So we need to check for that condition too.

```
IF(
  duedate < scheduleDate OR scheduleDate.isBlank(),
  duedate,
  scheduledate
)
```

---

<div class="post-metadata">

**Author:** ![Benn\_Bennett](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/benn_bennett/32/7017_2.png) [@Benn\_Bennett](https://connect.superhuman.com/u/Benn_Bennett)\
**Post date:** [January 20, 2021, 7:16pm UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880/4 "2021-01-20T19:16:20Z")

</div>

Thank you! I’m still wrapping my head around “if statements” in coda.

---

<div class="post-metadata">

**Author:** ![Benn\_Bennett](https://yyz1.discourse-cdn.com/coda1/user_avatar/connect.superhuman.com/benn_bennett/32/7017_2.png) [@Benn\_Bennett](https://connect.superhuman.com/u/Benn_Bennett)\
**Post date:** [January 20, 2021, 7:16pm UTC](https://connect.superhuman.com/t/how-to-show-earliest-date-from-2-separate-rows/19880/5 "2021-01-20T19:16:53Z")

</div>

Perfect, thanks for the blanks input!
