Macro to count rows

megamind007

New Member
Joined
Sep 22, 2013
Messages
43
Hey folks,
I need a macro (or if there is formula or any other method ) that counts the increase and decrease in the number of rows at the end of each day (i.e. number of records inserted and deleted in a workbook in some of the sheets and then gives a sum of those increases and decreases.These rows are transaction records and I dont need a net figure.I need increases and decreases separately.
P.S:these rows are in different sheets of the same workbook and i need the increase and decrease on a new worsheet of the same workbook.
Thanks in anticipation.
Regards,
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
if A1 = 76 = rows at start of day, at end of day use count function to determine number of rows = 113, increase is 113-76 = 37

if you want to know how many deletions separately then the deletions must be done within a macro that stores the number of rows deleted, by updating a suitable helper cell, could be A1 and A2 for deletions and insertions
 
Upvote 0
if A1 = 76 = rows at start of day, at end of day use count function to determine number of rows = 113, increase is 113-76 = 37

if you want to know how many deletions separately then the deletions must be done within a macro that stores the number of rows deleted, by updating a suitable helper cell, could be A1 and A2 for deletions and insertions


I think it cant be done using count function in this way as the records have blank rows in them as well.
P.S:whats a helper cell?
 
Upvote 0
a helper cell is any cell added to hold a value that can then be referenced - whole rows or columns can be helper cells
 
Upvote 0
there are various count and sumifs that can accept or reject blanks

=countif(A1:A100<>"dracula")

would always return 100 unless dracula in one of the cells
 
Upvote 0

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top