# Variable Rows Macro

• So I have about 4000+ rows of data that basically contain one column that has a name, and then a number associated with that person. But the number of rows for each person is variable. For example, in column A we have Bob Smith from row 1 to row 5, Mary Jane from row 6 to row 20, Tom White from row 21 to row 24; then in column B we have numbers that are associated with each person. So what needs to happen is every time the name of the person in column A changes, there needs to be a row added below it and then a total of all their number is column B placed underneath. I guess the tricky part of it is that it's not a set number of rows...

• Re: Variable Rows Macro

Not sure i understand... am I right in saying that the last row is just a total for everything in column B?

Maybe if you posted a cut down example of what you want to happen it would help...

Ger

_______________________________________________
There are 10 types of people in the world. Those that understand Binary and those that dont.

Why are Halloween and Christmas the same? Because Oct 31 = Dec 25...

_______________________________________________

• Re: Variable Rows Macro

EX:

Bob Smith 22
Bob Smith 100
Bob Smith 200
Total 222
Mary Jane 40
Mary Jane 80
Total 120

• Re: Variable Rows Macro

Hi

Try Subtotals, at each Change in Name(?), function Sum on column B

Robert

• Re: Variable Rows Macro

This appears to work ok...

HTH
Ger

_______________________________________________
There are 10 types of people in the world. Those that understand Binary and those that dont.

Why are Halloween and Christmas the same? Because Oct 31 = Dec 25...

_______________________________________________

## Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!