Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete text to right of a comma in a range of cells?
I have a long list of addresses and need to separate out the city and state,
which got merged all into one cell. Need to import data into Streets and Trips and want to delete all city and state info out of the address cells. Please assist. Mike |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete text to right of a comma in a range of cells?
Select the column with your data in and ensure that ythe next column is
empty. Go to DataText to Columns and choose delimited, then comma. Assuming your data is in column A you should get city in A and state in B. -- Ian -- "Mike M." <Mike wrote in message ... I have a long list of addresses and need to separate out the city and state, which got merged all into one cell. Need to import data into Streets and Trips and want to delete all city and state info out of the address cells. Please assist. Mike |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
How do I delete text to right of a comma in a range of cells?
Here's a simple example using VBA -- Assumes there are NO BLANK cells in your
Range.. Select (or Highlight) the range of cells (say B5:g20) then run this macro: (you've placed in a standard module). Sub RemoveText() Set MyRange = Selection For Each c In MyRange pos = WorksheetFunction.Find(",", c) c.Value = Mid(c, 1, pos - 1) Next c End Sub HTH, "Ian" wrote in message ... Select the column with your data in and ensure that ythe next column is empty. Go to DataText to Columns and choose delimited, then comma. Assuming your data is in column A you should get city in A and state in B. -- Ian -- "Mike M." <Mike wrote in message ... I have a long list of addresses and need to separate out the city and state, which got merged all into one cell. Need to import data into Streets and Trips and want to delete all city and state info out of the address cells. Please assist. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why can't I Export selected cells to tab-delimited text file? | Excel Discussion (Misc queries) | |||
Select Range of Cells | Excel Discussion (Misc queries) | |||
Cells formated as text do not always display properly | Excel Discussion (Misc queries) | |||
monitoring a changing range of cells | Excel Discussion (Misc queries) | |||
monitoring a changing range of cells | Excel Worksheet Functions |