Issue with VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-1877228%22%20slang%3D%22en-US%22%3EIssue%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1877228%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%202%20spreadsheets%2C%20in%20the%20first%20there%20is%20a%20list%20of%20projects%20with%20associated%20IDs%2C%20in%20the%20second%20there%20is%20a%20list%20of%20contracts%20associated%20to%20the%20project%20IDs.%20There%20can%20only%20ever%20be%20one%20project%20line%20yet%20there%20can%20be%20several%20contract%20lines%20for%20one%20project.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20used%20VLOOKUP%20to%20include%20all%20info%20for%20all%20lines%20(both%20project%20and%20contract)%20into%20one%20spreadsheet%20in%20order%20to%20carry%20out%20data%20quality%20controls.%20This%20works%20well%20for%20cases%20where%20there%20are%20contracts%20associated%20to%20a%20project%2C%20however%20when%20there%20is%20no%20contract%20line%20associated%20to%20a%20project%2C%20the%20project%20line%20does%20not%20appear%20because%20the%20result%20of%20the%20vlookup%20is%20looking%20for%20project%20id%20from%20project%20level%20in%20the%20project%20id%20at%20contract%20level.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20assume%20VLOOKUP%20won't%20work%20in%20this%20case%2C%20can%20anyone%20suggest%20another%20formula%20or%20way%20around%20this%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%20for%20any%20help%20on%20this!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1877228%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1877402%22%20slang%3D%22en-US%22%3ERe%3A%20Issue%20with%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1877402%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F865610%22%20target%3D%22_blank%22%3E%40Una_321%3C%2FA%3E%26nbsp%3BI%20think%20you%20might%20be%20able%20to%20use%20IFERROR()%20function%20to%20catch%20that%20error%20and%20act%20accordingly%20but%20I%20also%20think%20you%20should%20be%20looking%20at%20using%20power%20query%20for%20this%20functionality.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Hi,

 

I have 2 spreadsheets, in the first there is a list of projects with associated IDs, in the second there is a list of contracts associated to the project IDs. There can only ever be one project line yet there can be several contract lines for one project.

 

I used VLOOKUP to include all info for all lines (both project and contract) into one spreadsheet in order to carry out data quality controls. This works well for cases where there are contracts associated to a project, however when there is no contract line associated to a project, the project line does not appear because the result of the vlookup is looking for project id from project level in the project id at contract level.

 

I assume VLOOKUP won't work in this case, can anyone suggest another formula or way around this?

 

Thanks in advance for any help on this!

1 Reply

@Una_321 I think you might be able to use IFERROR() function to catch that error and act accordingly but I also think you should be looking at using power query for this functionality.