Solved

Char in Excel

Posted on 2014-01-29
3
144 Views
Last Modified: 2014-02-06
After Z2, I want it to be AA2, AB2, etc until AY2. Could you help?    

 Dim i As Integer = 1
        Dim k As Integer = 1
        Dim z As Integer = 50
        Dim row As Integer = 2

        For k = k To z
            i += 1
            Dim test As String = (Chr(64 + k)) & Trim(Str(row))
        Next
0
Comment
Question by:VBdotnet2005
  • 2
3 Comments
 
LVL 48

Accepted Solution

by:
Rgonzo1971 earned 500 total points
Comment Utility
Hi,

pls try

        For k = 1 To 125
            i = i + 1
            test = IIf(k >= 26, Chr(64 + (k \ 26)), "") & Chr(64 + (k Mod 26) + 1) & Trim(Str(row))
        Next

Open in new window

Regards
0
 

Author Comment

by:VBdotnet2005
Comment Utility
What is IIf?
0
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
Sorry it's (not VBA) If

Regards
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now