Okay so I'm nearly there with this code, it works on the first worksheet but when it selects the remaining ones it is not summing column c!!!! any ideas??
Please Login or Register to view this content.
Okay so I'm nearly there with this code, it works on the first worksheet but when it selects the remaining ones it is not summing column c!!!! any ideas??
Please Login or Register to view this content.
Try this:-
Regards MickPlease Login or Register to view this content.
Possibly data related. This is a bit shorter and assumes that all columns have the same number of rows determined by column C:
Please Login or Register to view this content.
Regards, TMS
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
@Mick
I think this:
Please Login or Register to view this content.
should be this:
Please Login or Register to view this content.
Regards, TMS
Mickg, this still does the same as mine! Maybe its me?
Tmshucks will try your new code, the other one you posted would not work as varying row sizes in worksheets, appreciate all the advice though guys as I'm new to this, thanks
TMs, where should I put this, sorry for being dozy!
Please Login or Register to view this content.
It's not an amendment to my code, it is an amendment to Mick's code which doesn't make the same assumption that mine did.
However, you do need to qualify the Rows.Count and relate it to the wksht. Hence "Rows.Count" becomes ".Rows.Count"
Regards, TMS
Ah,okay thanks I will try it
No problem. As I said, it's possibly data related so you may want to post a sample workbook.
Regards, TMS
Hi, yes I can but I'm now doing this from my phone as i'm out. Anychance I could post tomorrow and if your browsing you could look? or I could pm you? thanks for the advice you have given appreciate it
Not sure where you are on this , but the loop should have said 3 to 10 not 3 to 8.
In worked for me.
Last edited by MickG; 05-17-2013 at 01:42 PM.
Okay thank you, I will try this tomorrow as i'm out at the mo and doing this from my phone. Thanks for your suggestions and advice .
MickG invalid reference is what I get when I run the code, its on thepart? any ideas?Please Login or Register to view this content.
Which line of code is that?
There is no reference to just ".Rows". It is, in the original, "Rows.Count" and, in my revision, ".Rows.Count"
Regards, TMS
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks