Thread: I am not sure
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Frank Pytel Frank Pytel is offline
external usenet poster
 
Posts: 103
Default I am not sure

Hello;

I am trying to help someone, for which I am not sure there exists a
solution. He has a .csv file that he is opening in Excel. The values,
somehow, import into the correct conglomeration of data. More in a minute.

Column A is a number formatted as text. Column B is a series of numbers,
some formatted as text. Those that are not formatted as text, are separated
by commas (Huh!!) and hyphens.

The object is to concatenate the two values together. Example:

A | B | C
| |
1 | 357 |Argentina
| |
345 |32,34,39 |Paraguay
| 40-45 |
| |
33945 |27-30,41, | USA
|43, 45 |

The data should finally look like this for USA (etc.)

A | B
3394527 |USA
3394528 |USA
3394529 |USA
3394530 |USA
3394541 |USA
3394543 |USA
3394545 |USA

Which column the new values end up in does not matter. I know how to do this
fairly rapidly with formula's and a big enough worksheet. Then copy and paste
the values to where I want them.

I am wondering if this is even possible. I am not a big VB fan. I like to
avoid them if I can, but I wonder if this can even be handeled by VB. Column
B on one of the cells looks like this as an example.

264235, 264469, 264476, 264497, 264536-264539, 264543, 264581-264584,
264724, 264729, 264772-264773

There is no regularity to the number of digits. There is no regularity to
the hyphenation location. There is no regularity to the format of the numbers
(which I guess all could be changed to numbers and back to text for
concantenation) and there is no regularity to the quantity of values in the
cell.

Is there any hope for this? Any help would be appreciated.

Thank You

Frank Pytel

PS. I see a lot of posts here that look really nice. I am on the Office
Online site. I know these posts can be viewed and edited at other sites. Can
I set this up in Outlook so that I can Post and search. Kind of like Outlook
Express? Thanks