![]() |
| |||||||
| Home | Forums | Rules | All Albums | Blogs | Donate | Subscriptions | Register | Mark Forums Read |
| Software & OSs Operating Systems, Anti-Virus, Utilities and Programs. |
![]() |
| | LinkBack | Thread Tools |
| | #1 |
| Modder-ator | 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. |
| |
| | #2 | |
| Meow means woof in cat. Join Date: Oct 2006 Location: Elba, AL
Posts: 1,907
| Quote: 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 | |
| |
| | #4 |
| Banned Join Date: Jun 2006 Location: /home/yurimxpxman
Posts: 1,695
| |
| |
![]() |
|
| Tags |
| calling, programmers, vba |
| Thread Tools | |
|
|
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 |