Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Document merging
My problem is simple, but the explanation isnt that much...
I have a document called base.xls, and its composed of two columns. Column A is the string key, and column B is the string translation. Now i have a series of other documents that are composed of several columns, but then again columna A is the string key, and column D is the string translation. What i need to do is to create a routine at base.xls that can be used to compare column A from both documents, and if they match, put on the D cell of the second kind of document the text that is in the B cell of base.xls Also, i need to be able to change what document im comparing, because i have like 5 or 6 of the type 2 documents every week, and all need the string translation . Could anyone help me? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Document merging
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Document merging
Hi Remo,
Try this macro: Sub StrKeyFill() sectypewb = InputBox("Please, enter the path and name of the second type workbook (without extension)!") Workbooks.Open Filename:=sectypewb & ".xls" lastrow = Cells.Find("*", [A1], , , xlByRows, xlPrevious).Row Range("D2").Select ActiveCell.FormulaR1C1 = "=VLOOKUP(RC[-3],[base.xls]Sheet1!R2C1:R5C2,2,FALSE)" Selection.AutoFill Destination:=Range("D2:D" & lastrow), Type:=xlFillDefault End Sub It basically does the job, though it can be further refined, e.g. to check the existence of the second type file, etc. Regards, Stefi €˛Remo Turchetti€¯ ezt Ć*rta: My problem is simple, but the explanation isnt that much... I have a document called base.xls, and its composed of two columns. Column A is the string key, and column B is the string translation. Now i have a series of other documents that are composed of several columns, but then again columna A is the string key, and column D is the string translation. What i need to do is to create a routine at base.xls that can be used to compare column A from both documents, and if they match, put on the D cell of the second kind of document the text that is in the B cell of base.xls Also, i need to be able to change what document im comparing, because i have like 5 or 6 of the type 2 documents every week, and all need the string translation . Could anyone help me? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Merging into a Word document | Excel Discussion (Misc queries) | |||
Merging the Changes from One Excel Document into another | Excel Discussion (Misc queries) | |||
Merging cell data into a document? | Excel Discussion (Misc queries) | |||
Document merging function | Excel Discussion (Misc queries) | |||
Merging Document Help | Excel Worksheet Functions |