Replacing Blank Cells In Columns with a Date

sfmalone2001

New Member
Joined
Jul 25, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I have raw data that I pull from ServiceNow for the company I work at. One of the fields is Date Closed and unless the ticket is actually closed, it returns an empty cell which is scattered throughout about 10,000 records.

I copy the raw data into a Table, but before I can refresh my pivot tables which I have built I have to complete the following process:

I select Data
Select only the Blank Cells in the Date Closed Column
Enter =today() and press enter
The blank cells then populate with the current date
Deselect the Data Filter
Select Refresh all.

What I am trying to do is create some sort of formula on the first row of the table which says something like, if the cell is empty or blank, then to populate it with the current date. I just recently purchased a couple of books I have been reading by Bill & Michael, (Pivot Tables 2019) & VBA & Macro Scripting. I haven't gotten to the VBA book yet and about midway through the Pivot Table book which I have already began redoing some of my tables.

Any help would be greatly appreciated.

Shawn
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Hi & welcome to MrExcel, you cannot do it with a formula, but you can do it with a macro like this.
VBA Code:
  Sheets("Sheet1").ListObjects("Table1").ListColumns("Date Closed").DataBodyRange.SpecialCells(xlBlanks).Value = Date
Change sheet name, table name & column name to suit
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,527
Messages
6,120,057
Members
448,940
Latest member
mdusw

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