LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc
external usenet poster
 
Posts: 3
Default Concatenate Problem

Hi,

I don't know much about macros in excel but have used a few from the
postings from this group I am trying to create FIPS code for
counties, the way I have the data, the state code is given by
1,2,3....50, the county codes are 1, 2,3....15...100. To make a fips
code the state code 2 digits (i.e. if the code is 1 it has to be made
02) and the county code in 3 digits i.e. if its 1 it has to be made
001, are joined, so a county with state code 1 and county code 1 will
have a fips code of 01001, with county code 22 will have a fips code
of 01022 and so on. The way I am trying to do is I am recording a
macro by first converting the state column to 00 format and then
converting the county column to 000 format, inserting a new column-
FIPS, formating the fips column to 00000 and then concatenating the
state and county column, using CONCATENATE function in the new column,
the problem is that during concatenation excel removes the trailing 0,
ie if I concatenate 01 and 001, the result is 11 though I want it to
be 01001 ie 5 digits, it does not work even if I format the fips
column to 00000. Can anyone please advise how to do this using a macro
or some other script so that after concatenation the fips code will be
5 digits?

thanks

Singh

 
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
Concatenate question nick Excel Worksheet Functions 3 July 27th 06 11:40 PM
Excel Startup Problem aussievic Excel Discussion (Misc queries) 1 June 12th 06 04:33 PM
Problem with MS Community Newsgroups? [email protected] Excel Discussion (Misc queries) 4 May 14th 06 04:38 PM
Freeze Pane problem in shared workbooks JM Excel Discussion (Misc queries) 1 February 1st 05 12:04 AM
label problem Raven Maniac Excel Worksheet Functions 5 November 10th 04 10:10 PM


All times are GMT +1. The time now is 04:55 PM.

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

About Us

"It's about Microsoft Excel"