Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
HI all
I know nothing about macros or vba for excel, but I think what I need should be not that difficult. I have an TXT file like this: idnumber, year, quarter, program, duration, coutry 8888, 2004, winter, intensive, 10, brazil 8887, 2004, winter, intensive, 10, mexico 8889, 2004, winter, intensive, 10, china 8884, 2004, summer, intensive, 04, japan 8883, 2004, spring, conversat, 03, japan 8880, 2003, fall, gbm, 10, france and so on. then I have this excel spreadshet, one for each year, then each spreadshet has many tabs workshet, one for each program (intensive, conversat, gbm, etc) Each workshet has all contries on the colum A1-A146 What I need is a script who does this: 1) open the TXT file and start reading line by line 2) read one line, and pick the "year". Then open the spreadsheet ABC_'year', where 'year' is the 4 digits for that year 3) read the same line and pick the "program" + "duration". then open the worksheet "program duration" (will be named like 'intensive 10', 'intensive 04', 'conversation 10', 'conversation 03' and so on) at this point I will have the annual spreadsheet, oppend in the correct program+duration worksheet. 4) then I have to read the quarter (winter, summer, spring, fall) and I will sellect the column from that: winter = colum C, spring = conlum F, summer = colum H, fall=colum K). 5) then I will have to hlookup the country. Since I already have ALL countries on my spreadsheet (colum A1-A146), I have to find which row has the country I'm reading now from the TXT file. 6) Once I find the right row, then I have to ADD+1 to the content of that row. As I told, I know nothing about programing, but I'm a fast learning if I can have one example on how to do it. Could any one help me finding a script who can do it more or less? Thank you EHM |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create read-only Excel file 2007 | Excel Discussion (Misc queries) | |||
How do you save an excel file to be read as IBM-type text file ? | Excel Worksheet Functions | |||
excel - create a macro to use cell text as part of a file name | New Users to Excel | |||
create excel spreadsheet to display data from filled text forms | Excel Discussion (Misc queries) | |||
Read Text File into Excel Using VBA | Excel Discussion (Misc queries) |