Link to home
Start Free TrialLog in
Avatar of AlexF777
AlexF777

asked on

I have Excel spreadsheet with 6 columns and unknown # rows

I would like to have a flat file with 2 columns, where

column1 would contain Excel cols 1,3 and 5
column2 would contain Excel cols 2,4 and 6

Thanks in advance


Avatar of Harisha M G
Harisha M G
Flag of India image

Hi AlexF777,
    Flat file means? Text file? or another Excel sheet? Do you want it to be done in VBA?
   
Do this...
    Goto Excel --> Insert --> Worksheet.
    In the new sheet..
    A1 = Sheet1!A1 & Sheet1!A3 & Sheet1!A5
    B1 = Sheet1!A2 & Sheet1!A4 & Sheet1!A6
   
    Now copy both the formulas to the bottom to all the rows where you have data.
    Select both the columns and copy.
    Goto a text editor like notepad or wordpad and paste.

Bye
---
Harish
Avatar of virendra_malushte
virendra_malushte

elaborate the question..

Avatar of AlexF777

ASKER

    Flat file means text file.
     I want it done in VB.
     Not manually.

For example:    Col1  Col2  Col3  Col4  Col5  Col6
                         A      B       C      D       E     F
Would give me a flat text file with
                         A      B
                         C      D
                         E       F




ASKER CERTIFIED SOLUTION
Avatar of mvidas
mvidas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial