Hi Excel Experts!
I know very little about scripting but am creating several macros to aid in normal work administration tasks. So far I have used the Excel Macro tool to create scripts for what I require but have found a fault I am having trouble resolving.
The script I have creates a formula in 4 columns which then copies down to other rows depending on whether there is data in the first column. This scripts runs perfectly for spreadsheets with mutiple rows but fails when there is only 1 row in the sheet. The error I get is
"Run-time error '1004': AutoFill method of Range class failed"
I need this script to run for a worksheet for both multiple rows and single rows as the data is manipulated prior to the formula being inserted. Thus the amount of rows this code is run against will always be different.
This is the current code I am using
Can anyone advise how to amend the existing code to prevent this error from occuring?
Many Thanks
Matt
Bookmarks