delete rows which subtotal value is 0

titamagochang

New Member
Joined
Mar 3, 2016
Messages
5
Hi,
Right now, i'm trying to develop an excel dashboard to show the sales achievement of several stores every month,
In this case, i need to sum the rows that have the same month & remove the entire row that have 0 result in total row,
Because of the next user of my dashboard isn't me, I need to make it as simply as one click...
I read about vba in excel, but I don't really understood well..
Please, could someone help my case? Here is my table, store in sheet1 :

[TABLE="width: 720"]
<colgroup><col width="72" span="10" style="width:54pt"> </colgroup><tbody>[TR]
[TD="class: xl70, width: 72"][TABLE="width: 864"]
<colgroup><col width="72" span="12" style="width:54pt"> </colgroup><tbody>[TR]
[TD="class: xl70, width: 72"]ID[/TD]
[TD="class: xl70, width: 72"]STORE[/TD]
[TD="class: xl70, width: 72"]JAN[/TD]
[TD="class: xl70, width: 72"]FEB[/TD]
[TD="class: xl70, width: 72"]MARCH[/TD]
[TD="class: xl70, width: 72"]APRL[/TD]
[TD="class: xl70, width: 72"]JAN[/TD]
[TD="class: xl70, width: 72"]FEB[/TD]
[TD="class: xl70, width: 72"]MARCH[/TD]
[TD="class: xl70, width: 72"]APRL[/TD]
[TD="class: xl70, width: 72"]JUNE[/TD]
[TD="class: xl70, width: 72"]TOTAL[/TD]
[/TR]
[TR]
[TD="class: xl71"]33091[/TD]
[TD="class: xl71"]AB[/TD]
[TD="class: xl69"]3228324[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]2082988[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]2194125[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]1143362[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]8648799[/TD]
[/TR]
[TR]
[TD="class: xl71"]33092[/TD]
[TD="class: xl71"]CD[/TD]
[TD="class: xl69"]1076108[/TD]
[TD="class: xl69"]780492[/TD]
[TD="class: xl69"]7811207[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]2925500[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]12593307[/TD]
[/TR]
[TR]
[TD="class: xl71"]33093[/TD]
[TD="class: xl71"]EF[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]0[/TD]
[/TR]
[TR]
[TD="class: xl71"]33094[/TD]
[TD="class: xl71"]GH[/TD]
[TD="class: xl69"]6456648[/TD]
[TD="class: xl69"]7804920[/TD]
[TD="class: xl69"]12497928[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]10239250[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]6860172[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]43858918[/TD]
[/TR]
[TR]
[TD="class: xl71"]33095[/TD]
[TD="class: xl71"]IJ[/TD]
[TD="class: xl69"]4304432[/TD]
[TD="class: xl69"]1560984[/TD]
[TD="class: xl69"]35063634[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]23404000[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]9146896[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]73479946[/TD]
[/TR]
[TR]
[TD="class: xl71"]33096[/TD]
[TD="class: xl71"]KL[/TD]
[TD="class: xl69"]19369944[/TD]
[TD="class: xl69"]4682964[/TD]
[TD="class: xl69"]31244820[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]18284375[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]34300860[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]1.08E+08[/TD]
[/TR]
[TR]
[TD="class: xl71"]33097[/TD]
[TD="class: xl71"]MN[/TD]
[TD="class: xl69"]7532756[/TD]
[TD="class: xl69"]3121968[/TD]
[TD="class: xl69"]24995856[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]7313750[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]10290258[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]53254588[/TD]
[/TR]
[TR]
[TD="class: xl71"]33098[/TD]
[TD="class: xl71"]OP[/TD]
[TD="class: xl69"]15065512[/TD]
[TD="class: xl69"]7024428[/TD]
[TD="class: xl69"]15622410[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]9142188[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]9146896[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]56001434[/TD]
[/TR]
[TR]
[TD="class: xl71"]33099[/TD]
[TD="class: xl71"]QR[/TD]
[TD="class: xl69"]4304432[/TD]
[TD="class: xl69"]3121968[/TD]
[TD="class: xl69"]5207470[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]4388250[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]4573448[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]21595568[/TD]
[/TR]
[TR]
[TD="class: xl71"]33100[/TD]
[TD="class: xl71"]ST[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]780492[/TD]
[TD="class: xl69"]2082988[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]1462750[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]1143362[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]5469592[/TD]
[/TR]
[TR]
[TD="class: xl71"]33101[/TD]
[TD="class: xl71"]UV[/TD]
[TD="class: xl69"]6456648[/TD]
[TD="class: xl69"]3902460[/TD]
[TD="class: xl69"]9373446[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]8776500[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]5716810[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]34225864[/TD]
[/TR]
[TR]
[TD="class: xl71"]33102[/TD]
[TD="class: xl71"]WX[/TD]
[TD="class: xl69"]4304432[/TD]
[TD="class: xl69"]2341476[/TD]
[TD="class: xl69"]10414940[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]8045125[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]8003534[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"]33109507[/TD]
[/TR]
[TR]
[TD="class: xl69, colspan: 2"]TOTAL[/TD]
[TD="class: xl69"]72099236[/TD]
[TD="class: xl69"]35122152[/TD]
[TD="class: xl69"]1.56E+08[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]96175813[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]90325598[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl69"]0[/TD]
[TD="class: xl70"] [/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[TD="class: xl70, width: 72"][/TD]
[/TR]
</tbody>[/TABLE]

I need to store the result in the sheet2 in this table :

[TABLE="width: 432"]
<colgroup><col width="72" span="6" style="width:54pt"> </colgroup><tbody>[TR]
[TD="class: xl70, width: 72"]ID[/TD]
[TD="class: xl70, width: 72"]STORE[/TD]
[TD="class: xl70, width: 72"]JAN[/TD]
[TD="class: xl70, width: 72"]FEB[/TD]
[TD="class: xl70, width: 72"]MARCH[/TD]
[TD="class: xl70, width: 72"]APRL[/TD]
[/TR]
[TR]
[TD="class: xl71"]33091[/TD]
[TD="class: xl71"]AB[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33092[/TD]
[TD="class: xl71"]CD[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33093[/TD]
[TD="class: xl71"]EF[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33094[/TD]
[TD="class: xl71"]GH[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33095[/TD]
[TD="class: xl71"]IJ[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33096[/TD]
[TD="class: xl71"]KL[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33097[/TD]
[TD="class: xl71"]MN[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33098[/TD]
[TD="class: xl71"]OP[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33099[/TD]
[TD="class: xl71"]QR[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33100[/TD]
[TD="class: xl71"]ST[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33101[/TD]
[TD="class: xl71"]UV[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl71"]33102[/TD]
[TD="class: xl71"]WX[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
[TR]
[TD="class: xl69, colspan: 2"]TOTAL[/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[TD="class: xl69"] [/TD]
[/TR]
</tbody>[/TABLE]

Thank you for all your help :biggrin::biggrin::biggrin:
 

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
Oh, I made a mistake..
I mean, I need to sum all column that have the same month & remove the entire column that have the 0 value in total row, not sum & remove the entire row...

Thankyou :)
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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