Populating a date

JimMorris82

New Member
Joined
Apr 7, 2011
Messages
1
I'm trying to autopopulate a date in excel. Using Autofilter, the first thing I have it do is show me the blank fields. Then, I select the field I want to populate with the formula. These fields will get today's date. I've tried to used the code shown below but have been unsuccessful.

Range("R4").Select
Selection.AutoFilter Field:=18, Criteria1:="="
Range("R4").Select
ActiveCell.FormulaR1C1 = "=TODAY()"
Selection.FillDown
Selection.AutoFilter Field:=18
Selection.AutoFilter Field:=16

Because of the randomness of the data, it may not always be "R4", it may be "R18" that is the first blank. I don't want it to populate over info if it is there. I'm a little confused because I thought it would not be considered because it is hidden by the Autofilter function.
I've also had an issue with it pasting in my header name (header is "DATE" located in cell "R3".

Please help.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,224,502
Messages
6,179,126
Members
452,890
Latest member
Nikhil Ramesh

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