Function to convert column number to letter?

后端 未结 28 1846
灰色年华
灰色年华 2020-11-22 07:04

Does anyone have an Excel VBA function which can return the column letter(s) from a number?

For example, entering 100 should return CV.

28条回答
  •  萌比男神i
    2020-11-22 07:48

    Here's another way:

    {
    
          Sub find_test2()
    
                alpha_col = "A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,W,Z" 
                MsgBox Split(alpha_col, ",")(ActiveCell.Column - 1) 
    
          End Sub
    
    }
    

提交回复
热议问题