PDA

View Full Version : Need help reconstructing macros on this file in my description please!!!



estatefinds
01-12-2017, 06:03 PM
Hello, I have data in Columns A to O from row 2 to 38.
Row 1 shows the values as the header for the data below;
For example column A, row 10, shows the number 1 highlighted in red. The next red highlighted 1 is in row 18 and the next highlighted 1 is in row 26.

I need a macro that would count the empty rows between the A10 and the A18 and place this count of 7 in the column Al 17 because there are 7 empty rows between the two red highlighted values of 1.

The macro would continue downwards counting the empty rows between A 18 and A26 which coincidentally is 7 and place this data in column AL 25.

The macro would continue to go to next value of 2 and do similar actions. So for example, the count would start in Column B24 and count the empty row between the B24 and B26 which is one row so the 1 would be placed in column AM 25 then the macro continues down to B26 and counts the empty rows between B26 and B34 which is a count of 7 empty rows and this count of 7 would then go to column AM 33 and so on.

I am attaching a file to show what it should look like. also I have 3 different macros but need one of these to work as in my example in file please.

I cant figure this out!

Thank you in advance for your help!

SamT
01-12-2017, 08:59 PM
Are You allowing someone else to use your account here?
See: Need Help constructing a vba counts rows between data and. Please (http://www.vbaexpress.com/forum/showthread.php?58228-Need-Help-constructing-a-vba-counts-rows-between-data-and-Please)
That can get you banned.

estatefinds
01-12-2017, 09:13 PM
no, I had closed other question as unsolved and rewrote it with added macros on the file
i attached to get help with this. i would never let any one use my account ever. Thank you

estatefinds
01-13-2017, 12:02 PM
Just need to count empty rows in a column and place count in designated columns to the right. Then macro would do this for all columns until done. Can this be done?
Thank you

mikerickson
01-13-2017, 08:40 PM
Is this different than the issue in the other thread:
http://www.vbaexpress.com/forum/showthread.php?58228-Need-Help-constructing-a-vba-counts-rows-between-data-and-Please

which you have marked Solved?

estatefinds
01-14-2017, 06:10 PM
It was one I had before bout forgot to add macros to it. So I closed it and reposted it to better explain what I was looking for help for. And you solved it perfectly! Thank you again!