# IF AND formula to determine number of days

Options
✭✭✭✭✭✭
edited 08/15/22

Hi team - I imported this Excel spreadsheet but the formulas aren't the same in Smartsheet so I need help.

So in the encircled cell the Excel formula reads: =IF(AND(T2<>"",U2=""),DAYS(AC2,T2),"")

• T column = DD Kick Off Date
• U column = Date DDQ sent to TP
• AC column = Today's Date

I need a Smartsheet formula that states: if T column is not blank and U column is blank then count the number of days between AC (today's date) and T column (DD Kick Off Date). See third data row for an example output.

Thanks, in advance, for any assistance!

• ✭✭✭✭✭✭
Options

Try the below,

(Btw, unless the Today's Date column is used for any other purposes, you can remove that column as you can use the TODAY() function in SS and Excel both. If you do remove that column then just replace [Today's Date]@row in the formula below with TODAY())

```=IF(AND(NOT(ISBLANK([DD Kick Off Date]@row)), ISBLANK([Date DDQ sent to TP]@row)), [Today's Date]@row - [DD Kick Off Date]@row, "")
```
• ✭✭✭✭✭✭
Options

• ✭✭✭✭
Options

Can you provide the names of each column title to the corresponding excel column?

1. T column = DD Kick Off Date
2. U column = ?
3. AC column = ?
• ✭✭✭✭✭✭
edited 08/15/22
Options

Yes - they are

• U column = Date DDQ sent to TP
• AC column = Today's Date
• T column = DD Kick Off Date

• ✭✭✭✭✭✭
Options

Try the below,

(Btw, unless the Today's Date column is used for any other purposes, you can remove that column as you can use the TODAY() function in SS and Excel both. If you do remove that column then just replace [Today's Date]@row in the formula below with TODAY())

```=IF(AND(NOT(ISBLANK([DD Kick Off Date]@row)), ISBLANK([Date DDQ sent to TP]@row)), [Today's Date]@row - [DD Kick Off Date]@row, "")
```
• ✭✭✭✭✭✭
Options

That worked @Sameeh Akram.

I removed the [Today's Date]@row reference and just used TODAY() instead.

• ✭✭✭✭✭✭
Options