[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


Char in Excel

Posted on 2014-01-29
Medium Priority
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))
Question by:VBdotnet2005
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
LVL 53

Accepted Solution

Rgonzo1971 earned 2000 total points
ID: 39818725

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))

Open in new window


Author Comment

ID: 39818739
What is IIf?
LVL 53

Expert Comment

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


Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…

650 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