Hi All
I have recorded a macro to do the following, but it doesn't look neat and creates format issues with unsightly cell data in two columns. Can you possibly assist.
Workbook name = STOCK TAKE AUTOMATION TEMPLATE

The above is the main sheet. VBA should function in the following sequence. The range is Column E3, up to line E78.
(Step 1) If cell E3 has a value, then the value should be deleted and a VLOOKUP formula should be inserted. The lookup value is from Column B.
The reference/table is Column B-D in the below workbook. I have the code already that opens that workbook, so it will be visible. The return value is from below column D. See below workbook. This should only be done If range of cells E3 to E78 in STOCK TAKE AUTOMATION TEMPLATE has a value, otherwise nothing should be done.
Workbook name = VARIANCE RECOUNT 2 TEMPLATE

(Step 2) If cells in column G of STOCK TAKE AUTOMATION TEMPLATE has a value, then the value should be deleted, and formula =E3-F3 should be inserted.
I have recorded a macro myself doing the steps, and it works, but the rows with no data, in the range column E & G then has zero values, which creates a problem when I do a print to PDF. See below. So the macro and the way I have approached it works, but the result leaves unsightly cells with formulas included in the PDF print which I would like to avoid, See below.

The end result should look like this:

Any assistance will be greatly appreciated.
Regards