Urgent Help

  • Thread starter Thread starter kiran
  • Start date Start date
K

kiran

Hi All,
I have data in column A as follows

iut data
wexpro, data
cas - factory
pondy-sales
coffee:beverages fact

I want my output in B column as follows
A B
iut data iut
wexpro, data wexpro
cas - factory cas
pondy-sales pondy
coffee:beverages fact coffee

TIA
 
First of all, highlight column A and apply Find & Replace (CTRL-H)
three times as follows:

Find What: <hyphen>
Replace with <space><hyphen>
Replace All

CTRL-H
Find What: <colon>
Replace with <space><colon>
Replace All

CTRL-H
Find What: <comma>
Replace with <space><comma>
Replace All

Then you can apply Data | Text-to-Columns using <space> as the
delimiter and choosing to skip any columns beyond the first one and to
write the data to B1 on the final panel.

Hope this helps.

Pete
 
The following equation works but there is a probably an easier way with the
code or character set or a macro. But this equation does work and I have
added a semi-colon to the set of characters to search for, other characters
may be added.

=MID(A2,1,(MIN(IF(TYPE(FIND(" ",A2,1))=16,100,FIND("
",A2,1)),IF(TYPE(FIND(",",A2,1))=16,100,FIND(",",A2,1)),IF(TYPE(FIND("-",A2,1))=16,100,FIND("-",A2,1)),IF(TYPE(FIND(":",A2,1))=16,100,FIND(":",A2,1)),IF(TYPE(FIND(";",A2,1))=16,100,FIND(";",A2,1)))-1))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top