Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / February 2006

Tip: Looking for answers? Try searching our database.

insert row and add functions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gazeteer - 22 Feb 2006 00:42 GMT
I'm trying to write a macro to loop through rows in a large range.
When it determines that, for example A2 <> A3 it inserts two rows.
It then counts number of records in that section SUMS all the numbers
in this section. i.e above first newly inserted row back to last blank
row.

2006/02/14 65  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
2006/02/15 22  Apples
2006/02/15 11  Apples

Would then become

2006/02/14 65  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
2006/02/14 43  Apples
5                237

2006/02/15 22  Apples
2006/02/15 11  Apples
2                33 Apples

Any assistance would be very helpful

I've just about got inserting blank row..it's the next bit that's :-(.

Cheers
Jim Thomlinson - 22 Feb 2006 01:12 GMT
Instead of doing the code have you looked into subtotaling or a pivot table.
My preference for those kinds of things is a pivot table. You can make
multiple pivot tables off the same source data and also you could group your
items by day, month, year... It makes for a much more dynamic and user
friendly report. Not to mention by adding a format it will amaze and delight
anyone you send it to...
Signature

HTH...

Jim Thomlinson

> I'm trying to write a macro to loop through rows in a large range.
> When it determines that, for example A2 <> A3 it inserts two rows.
[quoted text clipped - 28 lines]
>
> Cheers
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.