#1   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default merge

data is imported from a text file as comma separated

There are 4 columns, however some data in column 2 have commas in the value.
this leads to excel
shifting the data into another columns

Eg. column 3 has dates in it. but due to that extra comma in the column 2,
the text in column 2 is shifted in the column 3 (date)
and so with column 4.

Is there a way to macro this?
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default merge

A macro could move down the data row-by-row. For each row, it would
calculate the number of filled (non-empty) cells. If too many cells were
filled, it could concatinate the data based upon some simple rules.

This is only an approach, not a full solution.
--
Gary's Student


"flow23" wrote:

data is imported from a text file as comma separated

There are 4 columns, however some data in column 2 have commas in the value.
this leads to excel
shifting the data into another columns

Eg. column 3 has dates in it. but due to that extra comma in the column 2,
the text in column 2 is shifted in the column 3 (date)
and so with column 4.

Is there a way to macro this?

  #3   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default merge

and how would that macro do it?

an if statement

pls help

"Gary''s Student" wrote:

A macro could move down the data row-by-row. For each row, it would
calculate the number of filled (non-empty) cells. If too many cells were
filled, it could concatinate the data based upon some simple rules.

This is only an approach, not a full solution.
--
Gary's Student


"flow23" wrote:

data is imported from a text file as comma separated

There are 4 columns, however some data in column 2 have commas in the value.
this leads to excel
shifting the data into another columns

Eg. column 3 has dates in it. but due to that extra comma in the column 2,
the text in column 2 is shifted in the column 3 (date)
and so with column 4.

Is there a way to macro this?

  #4   Report Post  
Posted to microsoft.public.excel.misc
Gary''s Student
 
Posts: n/a
Default merge

Say you only expect the first three cells in any of 10 rows to have data. If
the fourth cell has stuff in it, you want to take action:

Sub big_mac()
For i = 1 To 10
If IsEmpty(Cells(i, 4).Value) Then
Else
'your code goes here
End If
Next
End Sub
--
Gary''s Student


"flow23" wrote:

and how would that macro do it?

an if statement

pls help

"Gary''s Student" wrote:

A macro could move down the data row-by-row. For each row, it would
calculate the number of filled (non-empty) cells. If too many cells were
filled, it could concatinate the data based upon some simple rules.

This is only an approach, not a full solution.
--
Gary's Student


"flow23" wrote:

data is imported from a text file as comma separated

There are 4 columns, however some data in column 2 have commas in the value.
this leads to excel
shifting the data into another columns

Eg. column 3 has dates in it. but due to that extra comma in the column 2,
the text in column 2 is shifted in the column 3 (date)
and so with column 4.

Is there a way to macro this?

  #5   Report Post  
Posted to microsoft.public.excel.misc
flow23
 
Posts: n/a
Default merge

Thanks

Can you help with the code please..
basically it needs to merge Cell B and A for that row
and move d , e and f to C,d and e.



"Gary''s Student" wrote:

Say you only expect the first three cells in any of 10 rows to have data. If
the fourth cell has stuff in it, you want to take action:

Sub big_mac()
For i = 1 To 10
If IsEmpty(Cells(i, 4).Value) Then
Else
'your code goes here
End If
Next
End Sub
--
Gary''s Student


"flow23" wrote:

and how would that macro do it?

an if statement

pls help

"Gary''s Student" wrote:

A macro could move down the data row-by-row. For each row, it would
calculate the number of filled (non-empty) cells. If too many cells were
filled, it could concatinate the data based upon some simple rules.

This is only an approach, not a full solution.
--
Gary's Student


"flow23" wrote:

data is imported from a text file as comma separated

There are 4 columns, however some data in column 2 have commas in the value.
this leads to excel
shifting the data into another columns

Eg. column 3 has dates in it. but due to that extra comma in the column 2,
the text in column 2 is shifted in the column 3 (date)
and so with column 4.

Is there a way to macro this?

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
Merge & Center function is turned off...how do I turn it back on? zulumaster Excel Worksheet Functions 1 September 13th 05 12:47 AM
Different graphic for each record in mail merge document Alex St-Pierre Charts and Charting in Excel 1 May 4th 05 07:26 PM
How do I do an excel merge like a word mailmerge with another exc. jaewon223 Excel Discussion (Misc queries) 0 February 28th 05 05:01 PM
Serious Mail Merge Problem FNORD Excel Discussion (Misc queries) 0 February 8th 05 05:13 PM
Extract Data for Mail Merge Rashid Khan Excel Discussion (Misc queries) 7 December 24th 04 05:47 PM


All times are GMT +1. The time now is 04:17 PM.

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"