WantsToLearn
Programmer
I'm pretty new to Excel VBA. Can someone help clear up the cobwebs on the range object and the specialcells object? When do I need to activate or select the range to work with it? I'm a little confused as you can tell from the question.
As an example say I define a range object to be the range B1:C10. Now, if I do rng.specialcells(onlyFormula) (Sorry, I don't know the exact syntax without looking it up), that will return a reference to formula cells within B1:C10 correct? Do I need a second range object to hold the special cells result?
How do I iterate the formula cells returned? Do I need to select or activate them first before I can do that?
I can see that the range object is a very powerful object but I'm having trouble my arms around it so that I can begin to work with it.
Thank you for your help!
As an example say I define a range object to be the range B1:C10. Now, if I do rng.specialcells(onlyFormula) (Sorry, I don't know the exact syntax without looking it up), that will return a reference to formula cells within B1:C10 correct? Do I need a second range object to hold the special cells result?
How do I iterate the formula cells returned? Do I need to select or activate them first before I can do that?
I can see that the range object is a very powerful object but I'm having trouble my arms around it so that I can begin to work with it.
Thank you for your help!