Hi,
I have created a macro (my first ever), and it works nicely in the workbook where it was created. However, I get the same kind of data several times a week and that data is imported into a new workbook, and I'd like to use the macro I created to calculate some things in the new workbooks. Whenever I try, it says "Runtime error 9" and when I define this it says "Identifier under cursor is not recognized". I have watched several tutorial videos etc. but I just can't figure out what the problem is...
Can someone please help? Below is a snapshot of a part of the code, I assume the yellow part is where the problem is, but I don't know where the problem lies. I don't want the macro tied to a particular workbook because then I'd have to make a new one for each workbook, and that removes the whole idea of it - so I understand that there must be a solution to this?
Very grateful for any help!
I have created a macro (my first ever), and it works nicely in the workbook where it was created. However, I get the same kind of data several times a week and that data is imported into a new workbook, and I'd like to use the macro I created to calculate some things in the new workbooks. Whenever I try, it says "Runtime error 9" and when I define this it says "Identifier under cursor is not recognized". I have watched several tutorial videos etc. but I just can't figure out what the problem is...
Can someone please help? Below is a snapshot of a part of the code, I assume the yellow part is where the problem is, but I don't know where the problem lies. I don't want the macro tied to a particular workbook because then I'd have to make a new one for each workbook, and that removes the whole idea of it - so I understand that there must be a solution to this?
Very grateful for any help!