I am working in Excel 2010.
I have a worksheet where, from columns 4-100, in the second row, I have a date (e.g. 12/24/2011). Columns 4 to 8 have a date value of '12/12/2011' in row 2, Columns 9 to 12 have a value of 12/13/2011' in row 2, and so on.
I need to lock the columns based on the date in the second row. For instance, when it's December 20th, I am going to want to lock the columns where the cell in row 2 contains a date less than 12/20/2011. I know this is probably pretty easy, but I'm still getting the hang of the lookup functions. What is the correct formula in VBA for select the columns as specified here?