Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Seo Services company Manchester

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 02-11-2006, 02:10 PM
noraisens noraisens is offline
Registered User
 
Join Date: 11 Feb 2006
Posts: 3
noraisens is becoming part of the community
create simple macro

Please Register to Remove these Ads

I have one column of 500 numbers similar to this "cc03052" they all start with cc I need the macro to add "05" into the number at a specific point then to go the next.

before after
cc03052 cc0305052
cc04130 cc0412050

can anyone help me

Last edited by noraisens; 02-11-2006 at 02:12 PM.
Reply With Quote
  #2  
Old 02-11-2006, 02:13 PM
noraisens noraisens is offline
Registered User
 
Join Date: 11 Feb 2006
Posts: 3
noraisens is becoming part of the community
[quote=noraisens]I have one column of 500 numbers similar to this "cc03052" they all start with cc I need the macro to add "05" into the number at a specific point then to go the next.

before after
cc03052 cc0305052
cc04130 cc0412050

can anyone help me
thanks,
Ron
Reply With Quote
  #3  
Old 02-11-2006, 02:40 PM
Don Guillett
Guest
 
Posts: n/a
Re: create simple macro

You need to be a bit more specific. There doesn't seem to be a pattern here.

--
Don Guillett
SalesAid Software
dguillett1@austin.rr.com
"noraisens" <noraisens.232x6y_1139685303.8615@excelforum-nospam.com> wrote
in message news:noraisens.232x6y_1139685303.8615@excelforum-nospam.com...
>
> I have one column of 500 numbers similar to this "cc03052" they all
> start with cc I need the macro to add "05" into the number at a
> specific point then to go the next.
>
> before after
> cc03052 cc0305052
> cc04130 cc0412050
>
> can anyone help me
>
>
> --
> noraisens
> ------------------------------------------------------------------------
> noraisens's Profile:
> http://www.excelforum.com/member.php...o&userid=31450
> View this thread: http://www.excelforum.com/showthread...hreadid=511382
>



Reply With Quote
  #4  
Old 02-11-2006, 02:45 PM
Nick Hodge
Guest
 
Posts: n/a
Re: create simple macro

Can you not use a formula?

If the old values are in column A in B1 enter

=LEFT(A1,6)&"05"&RIGHT(A1,1)

And copy down. This presumes they (the old value) are all the same length.
If not paste back

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


"noraisens" <noraisens.232x6y_1139685303.8615@excelforum-nospam.com> wrote
in message news:noraisens.232x6y_1139685303.8615@excelforum-nospam.com...
>
> I have one column of 500 numbers similar to this "cc03052" they all
> start with cc I need the macro to add "05" into the number at a
> specific point then to go the next.
>
> before after
> cc03052 cc0305052
> cc04130 cc0412050
>
> can anyone help me
>
>
> --
> noraisens
> ------------------------------------------------------------------------
> noraisens's Profile:
> http://www.excelforum.com/member.php...o&userid=31450
> View this thread: http://www.excelforum.com/showthread...hreadid=511382
>



Reply With Quote
  #5  
Old 02-11-2006, 02:50 PM
Nick Hodge
Guest
 
Posts: n/a
Re: create simple macro

Don

I took it the second one was a typo

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


"Don Guillett" <dguillett1@austin.rr.com> wrote in message
news:OAMoNK0LGHA.2916@tk2msftngp13.phx.gbl...
> You need to be a bit more specific. There doesn't seem to be a pattern
> here.
>
> --
> Don Guillett
> SalesAid Software
> dguillett1@austin.rr.com
> "noraisens" <noraisens.232x6y_1139685303.8615@excelforum-nospam.com> wrote
> in message news:noraisens.232x6y_1139685303.8615@excelforum-nospam.com...
>>
>> I have one column of 500 numbers similar to this "cc03052" they all
>> start with cc I need the macro to add "05" into the number at a
>> specific point then to go the next.
>>
>> before after
>> cc03052 cc0305052
>> cc04130 cc0412050
>>
>> can anyone help me
>>
>>
>> --
>> noraisens
>> ------------------------------------------------------------------------
>> noraisens's Profile:
>> http://www.excelforum.com/member.php...o&userid=31450
>> View this thread:
>> http://www.excelforum.com/showthread...hreadid=511382
>>

>
>



Reply With Quote
  #6  
Old 02-12-2006, 08:03 PM
noraisens noraisens is offline
Registered User
 
Join Date: 11 Feb 2006
Posts: 3
noraisens is becoming part of the community
more info

Yes, the second post was a mistake.

I have 6 columns with information.
the second column has an id number with 2 letters and 5 numbers (ie: ccxxxxx). example: cc14081.
I would like to make this id number bigger by adding 2 numbers in a specific place in the id number (ie: ccxxxx05x). example: cc1408051.

I took the column of numbers and placed it in a new worksheet in column a

i took the formula =LEFT(A1,6)&"05"&RIGHT(A1,1) and placed it in column b.

I then copied it down and It worked. Thank you.

can I recap what was done.

LEFT(A1,6) in cell A1 go from the left 6 spaces
&"05"& insert 05
RIGHT(A1,1) in cell A1 go from the right 1 space and leave the digit in place.

Is this correct?

Is it possible to make this so that you can actually take the number out and replace it. as long as the column was identified?

thanks,
Ron
Reply With Quote
  #7  
Old 02-13-2006, 03:50 PM
Nick Hodge
Guest
 
Posts: n/a
Re: create simple macro

Ron

Left is taking the data from left of an input cell (A1) and then taking the
first 'x' characters. Right doe the same from the right. The other one you
have that could certainly be used to replace the number is MID

=MID(CellRef,StartCharacter,NoCharactersToTakeFromStartCharacter)

If that makes sense

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
www.nickhodge.co.uk
nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS


"noraisens" <noraisens.2358an_1139793001.3205@excelforum-nospam.com> wrote
in message news:noraisens.2358an_1139793001.3205@excelforum-nospam.com...
>
> Yes, the second post was a mistake.
>
> I have 6 columns with information.
> the second column has an id number with 2 letters and 5 numbers (ie:
> ccxxxxx). example: cc14081.
> I would like to make this id number bigger by adding 2 numbers in a
> specific place in the id number (ie: ccxxxx05x). example: cc1408051.
>
> I took the column of numbers and placed it in a new worksheet in column
> a
>
> i took the formula =LEFT(A1,6)&"05"&RIGHT(A1,1) and placed it in column
> b.
>
> I then copied it down and It worked. Thank you.
>
> can I recap what was done.
>
> LEFT(A1,6) in cell A1 go from the left 6 spaces
> &"05"& insert 05
> RIGHT(A1,1) in cell A1 go from the right 1 space and leave the digit in
> place.
>
> Is this correct?
>
> Is it possible to make this so that you can actually take the number
> out and replace it. as long as the column was identified?
>
> thanks,
> Ron
>
>
> --
> noraisens
> ------------------------------------------------------------------------
> noraisens's Profile:
> http://www.excelforum.com/member.php...o&userid=31450
> View this thread: http://www.excelforum.com/showthread...hreadid=511382
>



Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump