Eric Sandin
New member
- Local time
- Today, 13:43
- Joined
- Sep 20, 2010
- Messages
- 4
Hi.
I have been searching the web for a solution and found this wonderful site and although there are many examples in the forum about "find the data from a previous record", none have been able to help with my specific issue.
I have a table of dates (some cells are null) and need to auto fill the null fields with the data from above the null value.
So basically, I need to loop through the list and where there is a empty cell, copy/paste the data that is above the empty cell into the empty cell and continue on until the end of the list. If there are two or more empty/null values the last active date needs to be copied into the cell.
I have been able to work out a macro in Excel to do this with a "short-cut" key but it 1) requires that I hit the short cut key each time it hits an empty cell to loop through the list and 2) limits the amount of rows I can have in my table.
So, I'm now trying to do the same thing in Access that will loop through all the rows until the end.
As an example, if the data starts like this:
ID-Date
01-06/20/2010
02-
03-07/01/2009
04-
05-
06-01/01/1999
07-
08-
09-06/10/2009
10-
11-
I need it to end up like this:
01-06/20/2010
02-06/20/2010
03-07/01/2009
04-07/01/2009
05-07/01/2009
06-01/01/1999
07-01/01/1999
08-01/01/1999
09-06/10/2009
10-06/10/2009
11-06/10/2009
Any help would be greatly appreciated!
Thank you!!
I have been searching the web for a solution and found this wonderful site and although there are many examples in the forum about "find the data from a previous record", none have been able to help with my specific issue.
I have a table of dates (some cells are null) and need to auto fill the null fields with the data from above the null value.
So basically, I need to loop through the list and where there is a empty cell, copy/paste the data that is above the empty cell into the empty cell and continue on until the end of the list. If there are two or more empty/null values the last active date needs to be copied into the cell.
I have been able to work out a macro in Excel to do this with a "short-cut" key but it 1) requires that I hit the short cut key each time it hits an empty cell to loop through the list and 2) limits the amount of rows I can have in my table.
So, I'm now trying to do the same thing in Access that will loop through all the rows until the end.
As an example, if the data starts like this:
ID-Date
01-06/20/2010
02-
03-07/01/2009
04-
05-
06-01/01/1999
07-
08-
09-06/10/2009
10-
11-
I need it to end up like this:
01-06/20/2010
02-06/20/2010
03-07/01/2009
04-07/01/2009
05-07/01/2009
06-01/01/1999
07-01/01/1999
08-01/01/1999
09-06/10/2009
10-06/10/2009
11-06/10/2009
Any help would be greatly appreciated!
Thank you!!