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.
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.