Hello,
I recorded a macro to select a range of cells and then clear their contents. When I ran the macro, I got the error message "Compile error: Argument not optional"--I believe the string specifying the cells may have been too long. Following a suggestion on this board (#4 on this page), I tried to select the range of cells and assign a name to it in the name field to the left of the formula field (with the intention of using the name in my macro instead of recording it). With the range selected, I entered the name "BookQuantities." The name was assigned, but the full range of cells was not included. The cells I want to select are all in columns D-F and rows 39-701 (but not all those cells--different ones in each row), but when I selected "BookQuantities" from the name field, it only selected the cells through row 223. I tried two more times with the same result, then I went to Insert > Name > Define and selected BookQuantities, and then used "Refers to" to select the correct range of cells again. Now when I select "BookQuantities" from the name field, it only selects the cells through row 150. Do you have any idea what I'm doing wrong? Or do you know a better way to select those cells and clear their contents?
I was able to assign a different name to a much smaller range of cells without any problems.
I'm using Excel 2004 for Mac version 11.6.6. Please let me know if there's any other information that would help with this issue.
Thank you so much!!
Valerie
I recorded a macro to select a range of cells and then clear their contents. When I ran the macro, I got the error message "Compile error: Argument not optional"--I believe the string specifying the cells may have been too long. Following a suggestion on this board (#4 on this page), I tried to select the range of cells and assign a name to it in the name field to the left of the formula field (with the intention of using the name in my macro instead of recording it). With the range selected, I entered the name "BookQuantities." The name was assigned, but the full range of cells was not included. The cells I want to select are all in columns D-F and rows 39-701 (but not all those cells--different ones in each row), but when I selected "BookQuantities" from the name field, it only selected the cells through row 223. I tried two more times with the same result, then I went to Insert > Name > Define and selected BookQuantities, and then used "Refers to" to select the correct range of cells again. Now when I select "BookQuantities" from the name field, it only selects the cells through row 150. Do you have any idea what I'm doing wrong? Or do you know a better way to select those cells and clear their contents?
I was able to assign a different name to a much smaller range of cells without any problems.
I'm using Excel 2004 for Mac version 11.6.6. Please let me know if there's any other information that would help with this issue.
Thank you so much!!
Valerie