Link to home
Start Free TrialLog in
Avatar of xllvr
xllvrFlag for United States of America

asked on

Excel auto increment formula in data table capturing additional rows

Two issues in this mockup file:

The formula in Column B is designed to auto populate the incremental count of each work order in Column A.  (e.g., if Column A has 3 work orders with the same #, show 1, 2, 3).  Right now it's jumping to the end of the data table and providing the total count vs. incremental count.

My change event macro works for the most part but I can't get it to completely unfilter if Cell E1 is blank.

More detailed notes in file.

Thank you, Experts!!!
Count-Test.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Saqib Husain
Saqib Husain
Flag of Pakistan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of xllvr

ASKER

Beautiful solution to the macro.  Thank you so much!

In terms of the first issue, it happens if I try to add two work orders of the same number, one right after the other, underneath the table.  For example, I am in the row directly underneath the data table, I add 500 for example.  The table dynamically expands to include it and the formula in Column B works just fine.  If I add 500 underneath a 2nd time, that's where the problem arises.  It will change the result in Column B in the row above to include all the rows in its formula.  

I hope that helps describe the issue I'm having.  Thank you again for your time and expertise in helping solve the problem!
I am unable to reproduce your problem.

I corrected the formulas in rows 19, 20 and 21. Then I entered 500 in A22 then in A23 then in A24. The formulas updated just as expected.
Avatar of xllvr

ASKER

That is so odd.  So you were able to achieve the numbers 7, 8 and 9 in Column B starting in Row 22?   I don't understand why I'm having a different experience where it is showing 9, 9, 8, 9 starting in Row 21 (after adding 22 through 24).

If you have no idea why that would be happening, I'll close this question out.  Thanks!
Count-Test.xlsm
It beats me.

What version of excel do you have?
Avatar of xllvr

ASKER

I'm using 2010.  It really doesn't make sense to me.  Table mode is typically very reliable.  My only workaround which isn't very elegant is to have a macro that copies the formula down from the first cell all over again.  It works but feels pretty amateur unfortunately.

Thank you for your input and time!
Avatar of xllvr

ASKER

Very helpful!