IF/INDEX function returning #INVALID DATA TYPE

In my function below i am trying to fill the actual start date column with a new date if the predecessor task's duration was extended. ive replaced the Predecessors@row with a number value and the formula returned actual dates, so i suspect this is where i incorrectly identify a row number in the index function. i also understand that this formula cant work for the first row and rows without predecessors. any help would be appreciated!

=IF(INDEX($Predecessors$1:$[Actual Duration (days)]$31, Predecessors@row, 6) = INDEX($Predecessors$1:$[Actual Duration (days)]$31, Predecessors@row, 9), [Initial Start Date]@row, (INDEX($Predecessors$1:$[Actual Duration (days)]$31, Predecessors@row, 7)) + (INDEX($Predecessors$1:$[Actual Duration (days)]$31, Predecessors@row, 9)))

Answers

  • Lucas Rayala
    Lucas Rayala ✭✭✭✭✭✭

    @connormaloney -- Invalid Data Type is often triggered around dates when the wrong column type is selected (i.e. you are importing a date into a non-date column, or most-often you are trying to display non-date information in a date column).

    Check to ensure that each column is a Date column (in the column properties). If everything seems correct, troubleshoot by testing your formula in parts. First, does the criteria in the if statement work (use a non-date column to check). Then check the date inputs to ensure they work as well.

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!