elizabethlll
New Member
- Joined
- Jun 20, 2018
- Messages
- 7
Hello, I'm new to posting though reference threads from time to time - thank you!
I'm trying to create a macro that selects a range of cells in the current column, and then copies information from the cells in the column directly to the left in the range. I have gotten that to work successfully this far with the following (there are 51 cells I'm interested in):
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(51, 0)).Select
Selection.FillRight
This would happen daily, each day is a new column that copies the previous column when the user clicks a button that I've assigned the macro to. My problem is that after every 5 days, there are two blank columns (these represent Sat and Sun, for which no data is entered). So the user would come in Monday, run the macro to populate from the previous "day" (previous column) and it would come back with blanks. Is there a way to write a macro that populates fro the previous "day" (column) unless that column is blank, in which case it would populate from last "day" (column) with values? I should say that it's OK if there are some blank CELLS in the column from which I'm populating, but the whole column can't be blank.
Thank you!
I'm trying to create a macro that selects a range of cells in the current column, and then copies information from the cells in the column directly to the left in the range. I have gotten that to work successfully this far with the following (there are 51 cells I'm interested in):
Range(ActiveCell.Offset(1, 0), ActiveCell.Offset(51, 0)).Select
Selection.FillRight
This would happen daily, each day is a new column that copies the previous column when the user clicks a button that I've assigned the macro to. My problem is that after every 5 days, there are two blank columns (these represent Sat and Sun, for which no data is entered). So the user would come in Monday, run the macro to populate from the previous "day" (previous column) and it would come back with blanks. Is there a way to write a macro that populates fro the previous "day" (column) unless that column is blank, in which case it would populate from last "day" (column) with values? I should say that it's OK if there are some blank CELLS in the column from which I'm populating, but the whole column can't be blank.
Thank you!