![]() |
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? |
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? |
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? |
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? |
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? |
All times are GMT +1. The time now is 08:50 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com