Hello i have the below formula and would like to edit it to get it into a for loop
MainPage.Range("15:15" & LastColumn).Locked = False
MainPage.Range("15:15" & LastColumn).FormulaHidden = False
the way i would like to edit it is instead of just doing the whole row from i would like to do it with the columns as well but the column is referenced with an integer
so it would be like
MainPage.Range("D15:D15").Locked = False
MainPage.Range("D15:D15").FormulaHidden = False
MainPage.Range("E15:E15").Locked = False
MainPage.Range("E15:E15").FormulaHidden = False
MainPage.Range("P15:P15").Locked = False
MainPage.Range("P15:P15").FormulaHidden = False
MainPage.Range("Q15:Q15").Locked = False
MainPage.Range("Q15:Q15").FormulaHidden = False
The column would be the integer so "i"
but not sure how to write it like that where i am not putting the column letter would rather it be a number reference so i can write some math on what "i" will be or if needing to add other integers to do the math
MainPage.Range("15:15" & LastColumn).Locked = False
MainPage.Range("15:15" & LastColumn).FormulaHidden = False
the way i would like to edit it is instead of just doing the whole row from i would like to do it with the columns as well but the column is referenced with an integer
so it would be like
MainPage.Range("D15:D15").Locked = False
MainPage.Range("D15:D15").FormulaHidden = False
MainPage.Range("E15:E15").Locked = False
MainPage.Range("E15:E15").FormulaHidden = False
MainPage.Range("P15:P15").Locked = False
MainPage.Range("P15:P15").FormulaHidden = False
MainPage.Range("Q15:Q15").Locked = False
MainPage.Range("Q15:Q15").FormulaHidden = False
The column would be the integer so "i"
but not sure how to write it like that where i am not putting the column letter would rather it be a number reference so i can write some math on what "i" will be or if needing to add other integers to do the math