JeremyGraham95
New Member
- Joined
- Jan 12, 2016
- Messages
- 19
I am working on an inventory project and have 2 problems that i cannot find a solution for.
1. The first is i need to select the first empty cell in the first row and fill it with the current date. I have the code for the date working great and the code works fine the first time, but after that it does not seem to benefit me at all.
2. My second problem, the more complex problem. after completing the step above, i want the code to select the entire column of data starting with the third row, and also select the previous 3 columns, a total of 4 columns will be selected. and on top of this, i dont want it to select the first column. so with this being a brand new spreadsheet, the first 3 occurences would benefit from that code but would still be useful.
This is the code i have written:
Worksheets("TRENDS").Activate
SaveColNdx = Cells(1, Columns.Count).End(xlToLeft).Column
If SaveColNdx > 1 Then SaveColNdx = SaveColNdx + 1
With ActiveCell
.Value = Date
.NumberFormat = "mm/dd/yyyy"
*** later on i would like it to hide all columns except the first column ( info column) and the 6 columns with data that are closest to the right end of the sheet.
1. The first is i need to select the first empty cell in the first row and fill it with the current date. I have the code for the date working great and the code works fine the first time, but after that it does not seem to benefit me at all.
2. My second problem, the more complex problem. after completing the step above, i want the code to select the entire column of data starting with the third row, and also select the previous 3 columns, a total of 4 columns will be selected. and on top of this, i dont want it to select the first column. so with this being a brand new spreadsheet, the first 3 occurences would benefit from that code but would still be useful.
This is the code i have written:
Worksheets("TRENDS").Activate
SaveColNdx = Cells(1, Columns.Count).End(xlToLeft).Column
If SaveColNdx > 1 Then SaveColNdx = SaveColNdx + 1
With ActiveCell
.Value = Date
.NumberFormat = "mm/dd/yyyy"
*** later on i would like it to hide all columns except the first column ( info column) and the 6 columns with data that are closest to the right end of the sheet.