?
Solved

Char in Excel

Posted on 2014-01-29
3
Medium Priority
?
157 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 54

Accepted Solution

by:
Rgonzo1971 earned 2000 total points
ID: 39818725
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
ID: 39818739
What is IIf?
0
 
LVL 54

Expert Comment

by:Rgonzo1971
ID: 39818837
Sorry it's (not VBA) If

Regards
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Suggested Courses

864 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