I apologize for asking such a remedial and simple question, but I couldn’t really find the exact answer using google and its only making me more confused lol
Throughout my code in the spreadsheet I am using the furthest out column that is being used on the spreadsheet (column “IR”) in my code… example:
For Each cell In Range("C4:IR4").Cells
The problem is, when a situation arises where I’ll have to insert a new column (which won’t be very often, but it will eventually happen) I’ll have to go back in to the code and manually change all the “IR4” ‘s to “IS4” and so on… Now the “C” column will not ever change, and the row (4) will not ever change… Only the “IR” column will. Now, I understand the concept(kinda) on assigning a CONSTANT to represent the farthest out column (IR in this case) that is being utilized in the spreadsheet, but what I do not know is how to actually put that into code along with exactly how the code is written every time “IR” is referenced throughout all the code. ?? Thanks
Throughout my code in the spreadsheet I am using the furthest out column that is being used on the spreadsheet (column “IR”) in my code… example:
For Each cell In Range("C4:IR4").Cells
The problem is, when a situation arises where I’ll have to insert a new column (which won’t be very often, but it will eventually happen) I’ll have to go back in to the code and manually change all the “IR4” ‘s to “IS4” and so on… Now the “C” column will not ever change, and the row (4) will not ever change… Only the “IR” column will. Now, I understand the concept(kinda) on assigning a CONSTANT to represent the farthest out column (IR in this case) that is being utilized in the spreadsheet, but what I do not know is how to actually put that into code along with exactly how the code is written every time “IR” is referenced throughout all the code. ?? Thanks