Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

IF Function with multiple VLOOKUP

I need help as I need to track changes on my file. I actually have 2 tabs. One is the Old data and the other one is for the new data.

I have a total of 6 columns

Column A B C D and E are for my references

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Column F is for Concatenate of Columns A to E

Column G is for Remarks

What I need is for the remarks column to have a remark of "CHANGED"if any of the columns in ABCDE changed New data versus the Old data

"No Changed" if the data in Old data tab and New tab data matched

"New" if the data in New data tab cannot be found in Old data tab

Here’s what I have done so far:

CONCATENATE is the column name in the New data tab

=IF(VLOOKUP([@CONCATENATE],'Old data'!F:F,1,0)=[@CONCATENATE], "NO CHANGE", "CHANGED")

Whenever I make changes, N/A is showing as the result

>Solution :

As stated in the comments VLOOKUP returns an error if the value is not found. And if the criteria in an IF returns an error it will error.

So use ISERROR() to return TRUE/FALSE to the IF:

=IF(ISERROR(VLOOKUP([@CONCATENATE],'Old data'!G:G,1,0)),"CHANGED","NO CHANGE")

Another method that may be a little quicker is to use MATCH:

=IF(ISERROR(MATCH([@CONCATENATE],'Old data'!G:G,0)),"CHANGED","NO CHANGE")

This is my preferred method.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading