View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Matthew S Matthew S is offline
external usenet poster
 
Posts: 6
Default Problem with exported text

I modified the code to show as it does below. So worked. Wanted to make sure
I could figure it out first so disregard last post.

Thanks for all your help.

'get last row of data
EndRow = 0
For ColNdx = 1 To 24
LastRow = .Cells(Rows.Count, ColNdx).End(xlUp).Row
If LastRow EndRow Then
EndRow = LastRow
End If
Next ColNdx


If EndRow = 8 Then
For RowNdx = 8 To EndRow
LastCol = .Cells(RowNdx, Columns.Count).End(xlToLeft).Column

'LastCol = .Cells(RowNdx, Columns.Count).End(xlToLeft).Column
If LastCol < 1 Or .Range("A" & RowNdx) < "" Then

For ColNdx = 1 To 24
CellValue = Cells(RowNdx, ColNdx).Text

--
Matt




"Matthew S" wrote:

So I could have

For ColNdx = 1 To 24 instead of For ColNdx = 1 to LastCol?

Then probably just comment out:

' LastCol = .Cells(RowNdx, Columns.Count).End(xlToLeft).Column
' If LastCol < 1 Or .Range("A" & RowNdx) < "" Then



--
Matt




"joel" wrote:


It can be done either way. Some people need the the extra columns and
some people don't want them. In you case where you have semicolons
seperating the columns I can add extra semicolons so ther are 23
semicolons on each line seperating the 24 columns.


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:
http://www.thecodecage.com/forumz/sh...d.php?t=189337

http://www.thecodecage.com/forumz/chat.php

.