Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails
Private Sub Workbook_Open() If ActiveSheet.Cells(1, 11) = "Custom Attribute 3" Then 'nothing to do as already done ActiveWorkbook.Save Else 'fill extra columns FillColumnKLM 'now save and close Application.DisplayAlerts = False ActiveWorkbook.SaveAs "Active-transform.xls" Application.DisplayAlerts = True End If Application.Quit End Sub Sub FillColumnKLM() Dim WS As Worksheet, I As Long, RwCnt As Long Set WS = ActiveSheet RwCnt = WS.Cells(Rows.Count, 1).End(xlUp).Row WS.Cells(1, 11) = "Custom Attribute 3" WS.Cells(1, 11).Font.Bold = True For I = 2 To RwCnt On Error Resume Next If InStr(1, LCase(WS.Cells(I, 1)), "Fruit") Then WS.Cells(I, 11) = "Apple" Else End If If InStr(1, LCase(WS.Cells(I, 1)), "Vegetable") Then WS.Cells(I, 11) = "Carrot" Else End If Next Columns.AutoFit
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
15 Experts available now in Live!