Automatically rename the file if it exists

  • I have the specified the location and file name on the sheet1 but when i save the file everytime as pdf if the Range.C42 contains the same value the file automatically get replaced. How to create new file if the C42 value is same but without replacing the previous file.

  • Add these lines of code to your macro, could be a simple solution. It will add a random number at the end of Filename:

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!