AnswerBun.com

Blank a column if a condition is met

I have a established a custom list with 5 columns for testing.

  1. Title column
  2. Date columns (Date1 & Date2)
  3. Calculated column to count days between the 2 dates (Total)
  4. Calculated column to count how long it was since the first date column was entered (How Long).

What I am trying to accomplish is that when the "Date2" column is filled the "How Long" column will blank out.

Example:

enter image description here

So in this case because there is a date in the "Date2" column I want the "How Long" column to be blank. The current formula for my "How Long" column is simple: =Date1-TEXT(NOW(),"mm/dd/yyyy").

Is it possible to add additional syntax that will blank the "How Long" out when a date is entered into "Date2"?

SharePoint Asked on January 11, 2021

3 Answers

3 Answers

You can use the ISBLANK Syntax, as Matiur Rahman provided.

But the formula should be:

=IF(NOT(ISBLANK(Date2)),"",Date1-TEXT(NOW(),"mm/dd/yyyy"))

enter image description here

Correct answer by Chelsea_MSFT on January 11, 2021

In order to check if the date column is blank or not, you can use ISBLANK function in your formula.

Example:

=IF(ISBLANK([Date Column]), "Date column is blank", "Date column is filled")

So, in your case you need to update your formula like below:

=IF(ISBLANK([Date2]), [Date1]-TEXT(NOW(),"mm/dd/yyyy"), "")

Reference: IS functions - Check for ISBLANK example

Answered by Ganesh Sanap on January 11, 2021

Try this:

=IF(ISBLANK(Date2),"",Date1-TEXT(NOW(),"mm/dd/yyyy"))

enter image description here

Answered by Matiur Rahman on January 11, 2021

Add your own answers!

Related Questions

Like the List created and not the list item

2  Asked on January 27, 2021 by antra-sharma

     

SP 2016 – Only TTFB slow

2  Asked on January 16, 2021 by mhouston100

 

Unable to upload to SharePoint Online via VBA

1  Asked on January 11, 2021 by leroy

   

How to Create WF with C#

2  Asked on January 8, 2021 by whatsup

       

Ask a Question

Get help from others!

© 2022 AnswerBun.com. All rights reserved.