Maybe you could ask the user where they want to insert the column and if it's
ok, you could do the insertion.
If that's ok....
Option Explicit
Sub testme()
Dim myRng As Range
Dim okRng As Range
Dim Res As Variant
Dim rngToCheck As Range
Dim OkToInsertRng As Range
Dim myPWD As String
myPWD = "hi"
With ActiveSheet
Set rngToCheck = .Range("b1:az1")
Res = Application.Match("totals", rngToCheck, 0)
If IsError(Res) Then
MsgBox "Design error--not Totals found in " _
& rngToCheck.Address(0, 0) & vbLf _
& "Please contact Kevin Spacey"
Exit Sub
End If
Set OkToInsertRng = .Range("B1", rngToCheck(Res))
Set myRng = Nothing
On Error Resume Next
Set myRng = Application.InputBox _
(Prompt:="Select a column--I'll insert a column to its right.", _
Type:=8, Default:=ActiveCell.EntireColumn.Address(0, 0)) _
.Cells(1).EntireColumn.Cells(1)
On Error GoTo 0
If myRng Is Nothing Then
'user hit cancel
Exit Sub
End If
If Intersect(myRng, OkToInsertRng) Is Nothing Then
MsgBox "Please pick a column between B1 and " _
& rngToCheck(Res).Address(0, 0)
Exit Sub
End If
.Unprotect Password:=myPWD
myRng.EntireColumn.Insert
.Protect Password:=myPWD
End With
End Sub
And by providing the means to insert a new column, you can add more stuff after
the column is inserted.