Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ExcelExtrator
 
Posts: n/a
Default Extract sub-string of number from field of long series of numbers

I have field with 9 digit zip codes (5 digit plus 4 digits). I want to
create two separate fields from this one field - one field with 5 digits and
the othe field with 4 digits.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Gary''s Student
 
Posts: n/a
Default Extract sub-string of number from field of long series of numbers

If the codes are of the form 12345-6789 say in A1, then

=left(A1,5) will return the first 5 and
=right(A1,4) will return the last 4
--
Gary''s Student


"ExcelExtrator" wrote:

I have field with 9 digit zip codes (5 digit plus 4 digits). I want to
create two separate fields from this one field - one field with 5 digits and
the othe field with 4 digits.

Thanks

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Extract sub-string of number from field of long series of numbers

If the zip codes are text (which they probably are to be able to display the
leading zero), try this:

Select the zip code cells
DataText-to-Columns

--if there is a dash in the zip code:
choose Delimited and use the dash as the delimiter

--if there is no dash in the zip code:
choose Fixed Width and place the break point after the fifth character

Then click finish


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"ExcelExtrator" wrote:

I have field with 9 digit zip codes (5 digit plus 4 digits). I want to
create two separate fields from this one field - one field with 5 digits and
the othe field with 4 digits.

Thanks

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Coderre
 
Posts: n/a
Default Extract sub-string of number from field of long series of numb

Actually, if you use Text-to-Columns....

after you select the break point or the delimiter, you need to click Next so
you can indicate that both columns are Text.

***********
Regards,
Ron

XL2002, WinXP-Pro


"Ron Coderre" wrote:

If the zip codes are text (which they probably are to be able to display the
leading zero), try this:

Select the zip code cells
DataText-to-Columns

--if there is a dash in the zip code:
choose Delimited and use the dash as the delimiter

--if there is no dash in the zip code:
choose Fixed Width and place the break point after the fifth character

Then click finish


Does that help?

***********
Regards,
Ron

XL2002, WinXP-Pro


"ExcelExtrator" wrote:

I have field with 9 digit zip codes (5 digit plus 4 digits). I want to
create two separate fields from this one field - one field with 5 digits and
the othe field with 4 digits.

Thanks

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
Seed numbers for random number generation, uniform distribution darebo Excel Discussion (Misc queries) 3 April 21st 23 09:02 PM
Sorting Numbers with Multiple Decimals (cont.) Intern Ian Excel Discussion (Misc queries) 5 September 21st 05 12:04 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Find nth instance of a character in a string Francis Hayes (The Excel Addict) Excel Discussion (Misc queries) 7 January 21st 05 03:44 PM


All times are GMT +1. The time now is 02:36 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"