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

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.

Forum statistics

Threads
1,223,911
Messages
6,175,326
Members
452,635
Latest member
laura12345

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