"I tried using this but it gave me an error at the first "" ($B$1:$D$3<>"")."

I believe your version of Excel may use a slightly different format for the quotation mark ". Try replacing those in my formula with the version generated in your Excel.

Regards