Is there a way to populate a dropdown category in Google Sheets using wildcard matches from another table?

I’m trying to build an expenses sheet to categorize expenses. I have a sheet like this:

Category Date Description Amount
Jan 1 Lowes Purchase $2.00
Jan 2 Walmart Purchase $3.43

I have another tab where Category is sourced from a dropdown of values (Column A).

A B C D E F
Construction Home Depot Lowes
Grocery Walmart Target Krogers Publix Whole Foods
Restaurant Burger King McDonald’s Wendy’s

I am trying to build a formula that would auto-populate the Category value in the first table if there is ANY match of the values to the right of the Category. For example, the row Lowes Purchase would automatically update to Construction and the second row would automatically set to Grocery because of the Walmart wildcard match. Is this possible?

I’ve tried a contains but it only works with one value. Not sure if it’s possible to do multiple values, and also have "up to" and entire row of values. Each row could have a different # of possible matches.

How to refactor old Apple SDK files displaying build warnings in C++ with OSAtomicCompareAndSwap32()?

I’ve got some build warnings using some older Apple SDK files, which I’m attempting to refactor to silence the warnings.
I’m confused by the syntax, and hoped someone might be able to help explain it.

An example call is
OSAtomicCompareAndSwap32(mWriteIndex, (mWriteIndex + 1) & mMask, &mWriteIndex);
Could you please help to explain (mWriteIndex + 1) & mMask ?

All arguments are defined as int32_t types.

I’ve tried to use std::atomic_compare_exchange_strong_explicit as described by the error message, but am getting No matching function for call using

std::atomic<int32_t> mReadIndex, mWriteIndex, mFreeIndex;

std::atomic_compare_exchange_strong_explicit(&mWriteIndex, (mWriteIndex + 1) & mMask, &mWriteIndex, std::memory_order_relaxed, std::memory_order_relaxed);

‘OSAtomicCompareAndSwap32’ is deprecated: first deprecated in macOS 10.12 – Use std::atomic_compare_exchange_strong_explicit(std::memory_order_relaxed)