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

x
?
Solved

Char in Excel

Posted on 2014-01-29
3
Medium Priority
?
155 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
[X]
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
3 Comments
 
LVL 53

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 53

Expert Comment

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

Regards
0

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