Thread: merge
View Single Post
  #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?