So on my "sheet1" I have data in columns A, B, C, D, E, F

I would like VBA code to combine the 1st (A), 3rd(C) and 5th (E) column and save it to a comma separated text file.

I have:

```
Option Explicit

Public Sub ExcelRowsToCSV()

 Dim iPtr As Integer
 Dim sFileName As String
 Dim intFH As Integer
 Dim aRange As Range
 Dim iLastColumn As Integer
 Dim oCell As Range
 Dim iRec As Long

 Dim lenth As String

 Set aRange = Range("A1:C11")

 iLastColumn = aRange.Column + aRange.Columns.Count - 1

 iPtr = InStrRev(ActiveWorkbook.FullName, ".")
 sFileName = Left(ActiveWorkbook.FullName, iPtr - 1) & ".txt"
 sFileName = Application.GetSaveAsFilename(InitialFileName:=sFileName,  FileFilter:="TXT (Comma delimited) (*.txt), *.txt")
 If sFileName = "False" Then Exit Sub

 Close
 intFH = FreeFile()
 Open sFileName For Output As intFH

 iRec = 0

 For Each oCell In aRange

   If oCell.Column = iLastColumn Then

     Print #intFH, oCell.Value
     iRec = iRec + 1

   Else

     Print #intFH, oCell.Value; ",";
     iRec = iRec + 1

   End If

 Next oCell

 Close intFH

 MsgBox "Finished: " & CStr(iRec) & " records written to " _
 & sFileName & Space(10), vbOKOnly + vbInformation

End Sub

```

This works but only if the range declared has columns that lay right next to each other.