Only calculate formula if cell is not blank

MonicaAS

New Member
Joined
Jun 15, 2020
Messages
13
Office Version
  1. 2013
Platform
  1. Windows
In one column I have a date field. If there is no date I don't want the other columns to calculate the formula, using VBA.
Column c: 1/20/20 Column D: "formula is column c +21 days column E: "column d minus today.
its all based on the date field in column C.
 
Thank you. I will download it later tonight when I am at my home computer and take a look.
 
Upvote 0

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
The issue appears to be that you already have columns D and E populated down to the last row of data. So it is not recognizing that there is any new data that this needs to be run on.
 
Upvote 0
Thank you that worked. it's always the small things that trip me up.
 
Upvote 0
question. the code is running great however if we go back and add a comment, it won't delete the cell with the days left. I have to clear out the date in the due date column, then update it. is there something i can add so i don't have to clear the contents out of the due date column?
 
Upvote 0
question. the code is running great however if we go back and add a comment, it won't delete the cell with the days left. I have to clear out the date in the due date column, then update it. is there something i can add so i don't have to clear the contents out of the due date column?
As that is a new question, it is probably best to start a new thread on it.
In the new question, I would recommend posting your most current copy, and a copy of the workbook (and/or pertinent screen images) so whoever answers can see exactly what it is you are working with.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top