Dim colVar As Integer
Dim noOfCols As Integer
Dim colChars As String
Dim cellAdd As String
colChars ="ABCDEFGHIJKLMNOPQRSTUVWXYZ"
'This piece of code holds good
'for Columns upto 26 only
'Because beyond that the col names will
'be AA, AB, AC,...
'Then u may have to create and array
'using a loop to store the column names
noOfCols =10
For colVar =1 To noOfCols
cellAdd =Mid(colChars, colVar,1)&1Range(cellAdd).Value = noOfCols - colVar +1
Next colVar
Hope this solves ur problem.
Dear herephishy, plz dont break the thread. continue ur queries in the previous thread itself. so that u can get all ur related solutions in one single thread. this is just a piece of advice. hope i didn't say anything wrong
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.