Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

Hi,


I want to be able to fille alpha characters in a cell.
I can easily auto-fill numbers, but is it possible to auto-fille
letters? If so, what do i need to do?

Thanks,
George
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

Hopefully, this should help!

From what I know, this can't be done from the frontend worksheets bu
you can do it programmatically using VBA. Have a look at this :-

Sub test()
Dim cnt As Integer, tempval As Integer, final As Integer
cnt = 1
final = 26
tempval = 65 'for upper case A
Do While cnt <= final
Cells(cnt, 1).Value = Chr(tempval)
tempval = tempval + 1
cnt = cnt + 1
Loop
End Sub

The output is letters A through to Z in the first column in rows
through to row 26.


Best regards


Deepak Agarwa

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

On Thu, 5 Aug 2004 22:26:50 -0500, agarwaldvk
wrote:

Hopefully, this should help!

From what I know, this can't be done from the frontend worksheets but
you can do it programmatically using VBA. Have a look at this :-

Sub test()
Dim cnt As Integer, tempval As Integer, final As Integer
cnt = 1
final = 26
tempval = 65 'for upper case A
Do While cnt <= final
Cells(cnt, 1).Value = Chr(tempval)
tempval = tempval + 1
cnt = cnt + 1
Loop
End Sub

The output is letters A through to Z in the first column in rows 1
through to row 26.



Can you please give me a little more insight?
I put the code in the VBA editor, but exactly where, I'm not sure.

TIA
George

Best regards


Deepak Agarwal


---
Message posted from http://www.ExcelForum.com/


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

On Sat, 07 Aug 2004 01:29:13 GMT, George
wrote:

On Thu, 5 Aug 2004 22:26:50 -0500, agarwaldvk
wrote:

Hopefully, this should help!

From what I know, this can't be done from the frontend worksheets but
you can do it programmatically using VBA. Have a look at this :-

Sub test()
Dim cnt As Integer, tempval As Integer, final As Integer
cnt = 1
final = 26
tempval = 65 'for upper case A
Do While cnt <= final
Cells(cnt, 1).Value = Chr(tempval)
tempval = tempval + 1
cnt = cnt + 1
Loop
End Sub

The output is letters A through to Z in the first column in rows 1
through to row 26.



Can you please give me a little more insight?
I put the code in the VBA editor, but exactly where, I'm not sure.

TIA
George

Best regards


Deepak Agarwal


---
Message posted from http://www.ExcelForum.com/


Also, I forgot to ask, this will continue to

AA, AB, AC, AD and so on, after it reaches the first Z, correct?
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

Tools | Options
then go to the Custom Lists tab.
in the blank white box to the right, put in the letter of the alphabe
(or whatever you're wanting to fill) seperated with commas. then clic
Add.
Doesn't really save any time if you are only wanting to do this aut
fill once though

--
Message posted from http://www.ExcelForum.com



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Q. Autofill question: Can I autofill alpha characters like I can numbers?

You can write this code in a module sheet in VBA. If you cannot see a
module sheet, then insert one by going to Insert - Module.

Also, after Z it will not proceed to AA because the ACSII code for A i
65 and increases by 1 for each letter i.e 66 for B and so on. If yo
want it to go to AA then repeat the same code in a loop once i
reached Z.

Let me know how you went. If you continue to have problems, I shal
write the code for you next time but I would rather have you have a g
at this first.


Best regards


Deepak Agarwa

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Autofill question I think... Robbro Excel Discussion (Misc queries) 0 April 22nd 10 04:00 PM
Autofill question Gor_yee Excel Discussion (Misc queries) 2 November 12th 09 10:53 PM
Autofill: Need to autofill one week block, (5) weekday only into cells. dstock Excel Discussion (Misc queries) 1 June 17th 05 08:21 PM
autofill question Ben H Excel Discussion (Misc queries) 0 March 2nd 05 03:37 PM
Autofill question Eric Dreshfield Excel Programming 3 September 3rd 03 02:10 PM


All times are GMT +1. The time now is 02:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"