Insert Rows Based on criteria (or CountIf?)

hutch27

New Member
Joined
May 5, 2014
Messages
37
Hello,

I have two tabs, a summary tab, and a Data Tab. The Data Tab is organized like this (from rows 2 to 300 - with each person having a different number in Column E).

[TABLE="width: 500"]
<tbody>[TR]
[TD]Column B[/TD]
[TD]Column E[/TD]
[/TR]
[TR]
[TD]Person 1 (row 2)[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD]Person 2 (row 3)[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Person 3 (row 4)[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Person 4 (row 5)...[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Person 5 ...(row 300)[/TD]
[TD]0[/TD]
[/TR]
</tbody>[/TABLE]

I would like to add rows on the Summary tab (starting in row 4) equal to the total number of people on the Data tab that have a value in Column E > 0.

Therefore, using the example above, the macro would add in 3 new rows (starting on row 4) on the Summary tab, because there are 3 people on the Data Tab that have values in Column E > 0.

Thanks!
 
Glad I was able to help you.
Come back here to Mr. Excel next time you need additional assistance.
Great, this one seems to be working as intended - I appreciate the quick follow up and I hope I was clear with my explanations!
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,224,825
Messages
6,181,191
Members
453,021
Latest member
pingpong7117

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