I have a file with about 1500 cells that I would like to convert from sumif to a sum(if array. The sumif is throwing values so I would like to convert it to an array so I don't get values when the externally linked files are closed. I have started this process manually but I hope there is a VBA code I can run to make this go quickly? Below is the current formula and what I am hoping to convert those formulas to. Any help is much appreciated!

Current formula:
=SUMIF('EXTERNAL LINK',$D$2,'EXTERNAL LINK')

New array formula I would like to convert to:
={SUM(IF('EXTERNAL LINK'=$D$2,'EXTERNAL LINK',0))}

I use to have a VBA code I could run to put if(error on all my formulas but that was 10 years ago! I cant remember how to do this anymore!!!

Thanks!