2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by aktharshaik
0
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) & 1
        Range(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


Regards
Shaik Akthar

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.