I need to split data [1...M] gathered in columns [A...N] into separate text files named as first cell of each column.
Data arranged in excel:
FileName_A |FileName_B |FileName_C |… |FileName_N
Data_A1 |Data_B1 |Data_C1 |… |Data_N1
Data_A2 |Data_B2 |Data_C2 |… |Data_N2
Data_A3 |Data_B3 |Data_C3 |… |Data_N3
… … … … …
DataA_AM DataA_BM DataA_CM DataA_AM DataA_NM
____________________________________________________________________________
shall be written into FileNames
FileName_A.tex should look like:
_____________
Data_A1
Data_A2
Data_A3
…
DataA_AM
____________
I´ve tried, but...
Altough it seems an easy task for an expert, it is quite a huge obsticle for me becouse I am not familiar with coding.
Thank You very much for support in advance.
Try Code below.
You can change Row number and Column number. Your First row is always Header. See Image below for Excel
Excel Image
So, I assumed that M is an Integer Variable that you already defined and N just the Column Name (So column number 14). The code would then be
You might want to replace
Filename:=Sheets(1).Cells("1", i), _
withFilename:="C:/Your_Path/ & Sheets(1).Cells("1", i), _