1行目の名前というのは名前の定義ではなく1行目のセルの値ということでしょうか。
であれば、下記のようでどうでしょうか。
Sub test() Dim name As String name = "abc" If getColumn(name) = 0 Then MsgBox name & "はありません" Else MsgBox name & "は" & getColumn(name) & "列です" End If End Sub Function getColumn(cName As String) Dim res As Range Set res = Rows(1).Find(what:=cName, lookat:=xlWhole) If res Is Nothing Then getColumn = 0 Else getColumn = res.Column End If End Function
列を取得したい場所で getColumn( 名前 ) というように使用すれば取得できます。
ありがとうございます。やはりめんどうですね。