Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
chchch
 
Posts: n/a
Default expanding a range of numbers


In importing a text file to excel, I am looking for a way to expand
ranges of numbers. For example, the text line "1,2,4-6" includes the
number 5 (in the range 4-6). But when it is imported, using the
delimiter "," the result puts the string "4-6" in one cell. Adding "-"
as a delimiter, I get two cells: 4, and 6. What I actually want is three
cells: 4, 5, and 6.

Is there a way to either process this on import, or to convert "4-6"
after importing?


--
chchch
------------------------------------------------------------------------
chchch's Profile: http://www.excelforum.com/member.php...o&userid=31970
View this thread: http://www.excelforum.com/showthread...hreadid=517399

  #2   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK
 
Posts: n/a
Default expanding a range of numbers

You could use Find and Replace after importing - highlight the column
containing these ranges, and CTRL-H. In the Find What box enter 4-6 and
in the Replace With box enter 4,5,6, then click Replace All. You can do
this for other ranges in this style, then you can use
Data/Text-to-Columns to parse these using comma as the delimiter.

Hope this helps.

Pete

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
Average first n numbers in a range (there may be less than n numbe Mike A. M. Excel Discussion (Misc queries) 8 January 18th 06 02:55 PM
Count comma separated numbers, numbers in a range with dash, not t Mahendra Excel Discussion (Misc queries) 0 August 8th 05 05:56 PM
get a count of numbers whose value falls within a given range LyleB_Austin Excel Worksheet Functions 5 August 3rd 05 04:38 PM
Find Median of Positive numbers only in Range MichaelC Excel Worksheet Functions 4 June 24th 05 03:06 AM
occurance of numbers in cell range Dillenger Excel Worksheet Functions 14 February 21st 05 06:45 PM


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