Forum Discussion
Need help tweaking VBA code so I can add more columns to spreadsheet
- Mar 05, 2025
The code looks for the value "Completed" in column I.
If you insert one or more columns to the left of column I, the status will end up in another column, so you'll have to adjust the code. For example, if status is now in column K, change the line
Set xRg = Worksheets("Tasks").Range("I3:I" & I)
to
Set xRg = Worksheets("Tasks").Range("K3:K" & I)
If that is not correct, please provide more detailed information.
Thank-you.
Now my issue seems to be that since I am re-using an old spreadsheet (but tweaking it for a new use), the range is stuck as that of the old spreadsheet (ex. it adds the 'Completed' row to row 2557 rather than re-starting at row 3). I have been trying bits of code I am finding online but no dice on re-setting this. Any suggestions?