populate if blank otherwise do nothing

I have a specific [large] range of cells which, when the file opens gets populated if the cells are blank. If however these cells are already populated I do not want the code to overwrite what is already there.

Can an expert provide me with the code that will prevent the cells being populated if they already have data in them.

Many thanks
Who is Participating?
Saqib Husain, SyedEngineerCommented:
In that case, before those lines put

On error resume next

and after the lines put

On error goto 0
Saqib Husain, SyedEngineerCommented:
The code you have already does that. If you are facing a problem the please tell us the cell address and we can check.
JagwarmanAuthor Commented:
Hi Saqib Husain, Syed

it works first time, but if you save and close then open again it falls over

Error 1004. No cells were found.
JagwarmanAuthor Commented:
so so simple ..... when you know how,

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.