hitch_hiker
Active Member
- Joined
- Feb 21, 2012
- Messages
- 294
I have a list of sequential dates, which I fill data into the corresponding row. I have other events occurring on the same day ( the occurrence, the frequency, and number of events are random - it could be 7 times in one day then nothing for 3 days then 2 or??? ). Currently I manually add a row below the event date and fill data, I want to automate it a bit, I have a userform where I populate the data. I'm up to the point where I need to press "submit" and it goes to the ((date of the event) + 1 ) adds a row and populates it.
currently using a code modified from a suggestion from " Jolivanes " snippet below
this works well, I am attempting to modify it. I am thinking something like " if c.Value = datecheck Then c.value =c.Value+1" to get the next row, but I'm certain on how to get the row number, would it be "range(c.address.row).select" or something . ...... Looking for either some suggestions or pointing to some research
currently using a code modified from a suggestion from " Jolivanes " snippet below
Code:
Private Sub CommandButton1_Click()
'sub try this() by Jolivanes
Dim c As Range
Dim datecheck As Date
Dim WorkingDate As Range
datecheck = Range("'report entry'!a8").Value
For Each c In Range("'register report 19_20'!b1:b2000")
' need to change 'register report 2018_2019' to match sheet name as per current financial year to suit
Sheets("register report 19_20").Activate
' need to change 'register report 2018_2019' to match sheet name as per current financial year to suit
If c.Value = datecheck Then
' this transfers cells in "report entry" sheet to register report sheet
Range(c.Address).Select