I want your help to write a script (preferably python) that does the following. Given that I have two excel files with some matching values (names) in first column. The second column in first file has values (numbers) and second column in second file is empty. My task is to read a name from the second file, see if it matches to any name in the first file and then read the corresponding value from there, and then write that value back in the second file. And so on…
Help please!
I want your help to write a script (preferably python) that does the following.
Share
why won’t you use basic excel functions to do that? the
vlookupfunction is optimized to do this!your second option (only for very complex scenerio that basic vlookup or more advanced
index&matchfunctions can’t handle) should be datanitro that let you use python inside scripting Excel.there is a similiar Stackoverflow question a site dedicated to subject of working with excel from python (also a little old) so there is plenty of documantion if you choose this path for some reason. you should be warned most of python excel libs only deal with xls files and not with newer xlsx/xlsm.
openpyxl is supposed to be a newer lib with xlsx support but I havn’t tried it myself.
And some Meta StackOverflow advice: since you are a new user, this is a community driven Q&A site. please make answering your question easier by giving more data: what did you try? show us the code. explain what is the usecase, show some research etc. this would work towards showing the community that you did your effort, and we would be more inclinded to help. also accept correct or helpful answers, this would give us points and pleasure.