Forum Discussion

washpv1219's avatar
washpv1219
Copper Contributor
Dec 14, 2017

If Statement in Excel

I am trying to create this formula in a column to do two functions. I have columns B and I set to be filled with dates. I also have column J set to calculate the number of days between those 2 dates. What I want to happen is if column I has a date, column J will stop counting days up, but if column I has no date it will keep counting up days. What I came up with as the formula for this is =IF(I2="",=TODAY()-(B2),(I2-B2)), but it doesn't seem to work. Any ideas? 

1 Reply

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi,

     

    Please remove "=" before TODAY(). Bit shorter

    =IF(I2="",TODAY(),I2)-B2

Resources