If you want a row by row comparison, where each element in column A is tested against its corresponding value in column B, use the array formula
=IF(SUM(--(A1:A5=B1:B5))=ROWS(A1:A5),"same","different")
In this case, the order of the elements is important: {a,b,c,d} is different than {a,c,d,b}. This formula returns "same" if each element in A is equal to its corresponding element in column B. It will return "different" if columns A and B have different
values or the same values in a different order.
If you want to ensure that all of column A exists in column B, but not necessarily in the same row, use
=SUM(--COUNTIF($A$1:$A$5,B1:B5))=ROWS($A$1:$A$5)
This will return TRUE if every element in column A exists in column B, but not necessarily in the same row. If a value exists in B that does not exist in A (or vice versa), the result if FALSE. The order doesn't matter: {a,b,c,d} is considered the same
as {a,d,b,c}.
In both formulas, change the cell references to your ranges.
Both of these formulas are array formulas, so you must press CTRL SHIFT ENTER when you first enter the formula and whenever you edit it later. If you do this correctly, Excel will display the formula in the formula bar enclosed in curly braces { }. You don't
type in the braces -- Excel will insert them automatically when you press CTRL SHIFT ENTER. They will not work properly if you do not use CTRL SHIFT ENTER. See
www.cpearson.com/Excel/ArrayFormulas.aspx for much more information about array formulas.