loExcel = CreateObject("Excel.Application") loWorkBook = loExcel.Workbooks.Open(lcExcelFileFullPath) * Get a reference to the Sheets in the Excel spreadsheet loSheets = loWorkbook.Sheets * Now that we have a sheets collection lets * get the one we want to update FOR i = 1 to loSheets.Count loSheet = loSheets.Item(i) IF UPPER(loSheet.Name) = 'DATA SHEET' * We found what we want to work with EXIT ENDIF ENDFOR * IF there was not empty cell then we have to move columns over to create one * and to delete the first column (This drops off the oldest and adds a new one) IF NOT llFoundCell * What we are doing here is calling a macro to do our work * which is easier than coding it here loExcel.Run("AddNewMetricColumn") loExcel.Run("DeleteFirstMetricColumn") * The starting column will be the last one lcStartColumn = 'Q' ENDIF