How to control (with VBA) cell value in column header (restricted characters,blanks,...), before creating (changing) range name and before creating (changing) pivot table (excel 2000 and more). Are both limitations the same or different?
Please post an example of the first X rows of data you are importing.
You realize that if you use Data > Import External Data > IMPORT, you can control which record becomes the FIRST ROW imported, and you can PARSE the data if necessary.
I would recommend AGAINST OPENING a text file in Excel. Use IMPORT instead!!!
Skip, Have you heard that the roundest knight at King Arthur's round table was... Sir Cumference!
With opening txt to xls I add additional data (new columns), calculated from imported columns so I need to open it. First imported row txt to xls become range names and pivot items. I want to examine if imported first txt row
have structure, not conflict with names, created with VBA.
I haven't found if there is any help about non usable characters with "creating names".
txt structure
10OE10 %OE% Naz%iv Ob?ina Nasl / ov Skupna-PC Dat./ akt. Delilno SM 00 Parameter
SM 9060 SM_P STAVBA, GER 5528 900 0 A 25.08.1999
SM 6276 E_GOST.PODJETJE TROJANE 5189 TROJANE 11 0 A 25.08.1999
SM 1884 E_VO? E DELTA 5094 POSTOJANA, TITOVA 2 0 A 06.09.1999
You need to loop through your column headers and test for spaces and illegal characters
Would suggest writing a function to check 1 cell - you can then loop through your header cells and apply that function to each
Rgds, Geoff
We could learn a lot from crayons. Some are sharp, some are pretty and some are dull. Some have weird names and all are different colours but they all live in the same box.
"With opening txt to xls I add additional data (new columns), calculated from imported columns so I need to open it."
There is absolutley no distinction in your statement between OPENING the text file with Excel or IMPORTING the text file into Excel. OPENING a text file leads to the possibility of certain data being misinterpreted by Excel.
I strongly recommend AGAINST OPEN and FOR IMPORT.
I agree with Geoff on the headings.
Skip, Have you heard that the roundest knight at King Arthur's round table was... Sir Cumference!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.