Lets test your Excel skills. Can you write a formula to check few cells are equal?
Your homework:
- Let us say you have four values in cells A1, A2, A3, A4
- Write a formula to check if all 4 cells have same value (ie A1=A2=A3=A4)
- Your output can be TRUE/FALSE or 1/0 to indicate a match (or mis-match)
Bonus question 1:
How would you write a formula if your values are in range A1:An
Bonus question 2:
What formula would work well if the cells contain non-numeric values (text, logical etc.)
Obvious answer:
The easiest and obvious answer is to test if all them are equal. The formula is,
=AND(A1=A2,A1=A3,A1=A4)
(select the above blank line to see answer)
But can you come up with some other options to test the equality?














One Response to “How to compare two Excel sheets using VLOOKUP? [FREE Template]”
Maybe I missed it, but this method doesn't include data from James that isn't contained in Sara's data.
I added a new sheet, and named the ranges for Sara and James.
Maybe something like:
B2: =SORT(UNIQUE(VSTACK(SaraCust, JamesCust)))
C2: =XLOOKUP(B2#,SaraCust,SaraPaid,"Missing")
D2: =XLOOKUP(B2#,JamesCust, JamesPaid,"Missing")
E2: =IF(ISERROR(C2#+D2#),"Missing",IF(C2#=D2#,"Yes","No"))
Then we can still do similar conditional formatting. But this will pull in data missing from Sara's sheet as well.