# Macro to count rows

#### megamind007

##### New Member
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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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

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?

a helper cell is any cell added to hold a value that can then be referenced - whole rows or columns can be helper cells

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

Replies
4
Views
340
Replies
0
Views
333
Replies
0
Views
180
Replies
1
Views
414
Replies
20
Views
359

1,196,280
Messages
6,014,433
Members
441,818
Latest member
itsfaisalkhalid

### 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.

### Which adblocker are you using?

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

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