Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an export format coming over from my hand help device that is coming
over in .csv when i open it up in excel my format is as follows: date,time,value,shift date, time,value,shift date,time,value,shift date,time value shift How i need it to come over is this way: date,time,value,shift[]date,time,value,shift[],date,time,value,shift....... The[]is the CRLF how can i set the above format up running an excel macro? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
LMI,
You could use a macro: Select the cells, and run this. Sub CombineMacro() Dim myCell As Range Dim myVal As String Selection.EntireColumn.AutoFit myVal = Selection.Cells(1).Value For Each myCell In Selection.Offset(1).Resize(Selection.Rows.Count - 1) myVal = myVal & Chr(10) & myCell.Value Next myCell Selection.ClearContents Selection.Cells(1).Value = myVal Selection.Cells(1).WrapText = True End Sub HTH, Bernie MS Excel MVP "LMI" wrote in message ... I have an export format coming over from my hand help device that is coming over in .csv when i open it up in excel my format is as follows: date,time,value,shift date, time,value,shift date,time,value,shift date,time value shift How i need it to come over is this way: date,time,value,shift[]date,time,value,shift[],date,time,value,shift....... The[]is the CRLF how can i set the above format up running an excel macro? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"4/5/2006
4/5/2006 0.475509259259259 18952 7.86072 7.86072 7.86072 7.86072 4/5/2006 0.475543981481481 18952 7.86072 7.86072 7.86072 7.86072", , , This works real good but how can i get the " and the extra ,, at te end off the file? Also how do i get my date 5 values and then have a CRLF then data again 5 values and CRLF ??? "Bernie Deitrick" wrote: LMI, You could use a macro: Select the cells, and run this. Sub CombineMacro() Dim myCell As Range Dim myVal As String Selection.EntireColumn.AutoFit myVal = Selection.Cells(1).Value For Each myCell In Selection.Offset(1).Resize(Selection.Rows.Count - 1) myVal = myVal & Chr(10) & myCell.Value Next myCell Selection.ClearContents Selection.Cells(1).Value = myVal Selection.Cells(1).WrapText = True End Sub HTH, Bernie MS Excel MVP "LMI" wrote in message ... I have an export format coming over from my hand help device that is coming over in .csv when i open it up in excel my format is as follows: date,time,value,shift date, time,value,shift date,time,value,shift date,time value shift How i need it to come over is this way: date,time,value,shift[]date,time,value,shift[],date,time,value,shift....... The[]is the CRLF how can i set the above format up running an excel macro? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I get SQL data to show CRLF instead of question marks? | Excel Discussion (Misc queries) | |||
Cut and Paste Text with CRLF into Single Cell | Excel Discussion (Misc queries) | |||
Making tab do a CRLF when reaching end of a range | Excel Discussion (Misc queries) | |||
HELP - How to replace CRLF with a character withing an excel column | Excel Discussion (Misc queries) | |||
CRLF in text box | Excel Programming |