Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how do i add commas in a single cell?

okay, so i have a single line of imported addresses where the entire address
is in one cell. I don't want to move cities, etc. to another cell; I just
want to add comma's in the appropriate places. Is there a way to do that?

i.e. :

Cell A1
123 Anywhere St Somewhere in US 12345

Becomes:

Cell A1
123 Anywhere St, Somewhere in US, 12345
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,934
Default how do i add commas in a single cell?

Basically, no... since street names and cities (and states for that matter)
can contain multiple (space delimited) words, there is no way to tell where
the address part ends and the city part begins. You might be be able to
construct a list of all the possible roadway designations (Street, Lane,
Road, Way, Court, etc.) and search for them; but, if you do this, you would
probably have to do this as abbreviations since I am aware of at least one
roadway in Philadelphia, Pennsylvania that is called 'Street Road', so you
would need to be able to distinguish such street name and roadway
designation combinations. And this would take VBA code to accomplish. Also,
you would have to make sure you accounted for all the possible roadway
designations possible (here I am thinking of St and Str both being
abbreviations for Street as an example).

--
Rick (MVP - Excel)


"Footlight" wrote in message
...
okay, so i have a single line of imported addresses where the entire
address
is in one cell. I don't want to move cities, etc. to another cell; I just
want to add comma's in the appropriate places. Is there a way to do that?

i.e. :

Cell A1
123 Anywhere St Somewhere in US 12345

Becomes:

Cell A1
123 Anywhere St, Somewhere in US, 12345


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 622
Default how do i add commas in a single cell?

Imported from where? Can you put the commas in before it gets to
Excel? Maybe save/import in a different format instead that Excel can
use more easily?

Or, if you can separate them properly to other cells, it will be
easier to put them back into one cell with commas (using Concatenate)
than the VBA method mentioned by Rick.
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
How do I add commas after each text in each cell? ChrishBiz New Users to Excel 3 April 3rd 23 11:08 AM
Count the number of Commas found in cell A2 B~O~B Excel Worksheet Functions 3 April 2nd 08 05:27 PM
From single cell variables to a single column serie noyau New Users to Excel 1 December 22nd 06 06:43 AM
Splitting data in a single cell that is seperated by commas, then moving to make individual rows [email protected] Excel Discussion (Misc queries) 2 April 3rd 06 10:44 AM
is there a way to add single digits within a single cell? ceci Excel Worksheet Functions 3 August 18th 05 08:58 PM


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