HardwareLogic

Go Back   HardwareLogic > Specific Hardware > Software & OSs
Home Forums Rules All AlbumsBlogs Donate Subscriptions Register Mark Forums Read

Software & OSs Operating Systems, Anti-Virus, Utilities and Programs.

Closed Thread
 
LinkBack Thread Tools
Old November 30th, 2006   #1
Modder-ator
 
gvblake22's Avatar
 
Join Date: Dec 2005
Location: Tempe Desert
Posts: 6,351
Blog Entries: 1
Default Calling all VBA programmers!!!

Ok, I'm trying to write some macros in Excel 2003 using VBA. Here is the first of probably several questions to come...

I have a string of numbers like 051327525900 and I need to insert several dashes to separate chunks of numbers (no spaces, just four dashes) so it looks like 05-13-275-259-00.
What's the best way to do this?

I may also want to be able to pull out the chunks of numbers and write them to their own cell in their own column later on, so I was thinking if I could just select the chunks of numbers and write them then put them back together with the "&" concatonate operator and put the dashes in there.

SO... What would be ideal is if I could get the code or function to select the first two characters of a string. Then to select the third and fourth characters, then the fifth, sixth, and seventh characters, and so on.


EDIT:
NEVERMIND! You guys are too slow. I stumbled across the Mid function and it worked perfect.




Last edited by gvblake22; November 30th, 2006 at 09:50.
gvblake22 is online now  
Old November 30th, 2006   #2
Meow means woof in cat.
 
Panda Man's Avatar
 
Join Date: Oct 2006
Location: Elba, AL
Posts: 1,907
Default

Quote:
Originally Posted by gvblake22 View Post
EDIT:
NEVERMIND! You guys are too slow. I stumbled across the Mid function and it worked perfect.
No, its just nobody ever uses Visual Basic anymore other than for scarring other people by making message boxes appear randomly. :P



Intel Core 2 Duo E6420 Conroe @ 2.80GHz
Cooler Master GeminII - Thanks Rich and HL!
GIGABYTE GA-965P-DS3 (rev. 1.3)
EVGA GeForce 8800GTS 320MB @ 726/962
CORSAIR XMS2 4GB (4 x 1GB) DDR2-800
OCZ GameXStream 600W PSU
Maxtor 300GB 7200RPM SATA150 16MB cache HDD
Seagate 500GB 7200ROM SATA300 16mb cache HDD
Sony NEC Optiarc 18X DVD±R DVD
Creative Sound Blaster X-Fi XtremeMusic 7.1
ZyXel m-202 802.11g adapter
Antec Nine Hundred
Creative 5.1 speakers
Viewsonic Optiquest q20wb 20" LCD
Panda Man is offline  
Old November 30th, 2006   #3
Modder-ator
 
gvblake22's Avatar
 
Join Date: Dec 2005
Location: Tempe Desert
Posts: 6,351
Blog Entries: 1
Default

HAHA, maybe for some. But I've been able to do lots of great things I never realistically would have been able to do otherwise without VBA programming.

So a big :eviltongue: to you to



gvblake22 is online now  
Old November 30th, 2006   #4
Banned
 
yurimxpxman's Avatar
 
Join Date: Jun 2006
Location: /home/yurimxpxman
Posts: 1,695
Default

Quote:
Originally Posted by gvblake22 View Post
HAHA, maybe for some. But I've been able to do lots of great things I never realistically would have been able to do otherwise without VBA programming.

So a big :eviltongue: to you to
My cousin uses VBA. I've been using C++ though. Before that, it was GML.
yurimxpxman is offline  
Closed Thread

  HardwareLogic > Specific Hardware > Software & OSs

Tags
calling, programmers, vba


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Calling Captain Crunch One4yu2c HL Lounge 18 March 28th, 2008 04:40
PC Configuration Software: Calling all programmers Tyreal Software & OSs 12 April 18th, 2006 12:08


All times are GMT -8. The time now is 17:59.


Powered by vBulletin® Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
© HardwareLogic 2005 - 2008. All Rights Reserved


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49