How to deduct one row

Bryan123

New Member
Joined
May 23, 2019
Messages
41
Hi All,

How do you deduct 1 row from the last row selected using ctrl+shift+down? In this way, I won't be including "Grand Total" to the graph that I will be creating.

Range("A5").Select
Range(Selection, Selection.End(xlDown)).Select


[TABLE="width: 632"]
<colgroup><col width="305" style="width: 229pt; mso-width-source: userset; mso-width-alt: 9760;"> <col width="129" style="width: 97pt; mso-width-source: userset; mso-width-alt: 4128;"> <col width="27" style="width: 20pt; mso-width-source: userset; mso-width-alt: 864;"> <col width="96" style="width: 72pt; mso-width-source: userset; mso-width-alt: 3072;"> <col width="93" style="width: 70pt; mso-width-source: userset; mso-width-alt: 2976;"> <col width="101" style="width: 76pt; mso-width-source: userset; mso-width-alt: 3232;"> <col width="91" style="width: 68pt; mso-width-source: userset; mso-width-alt: 2912;"> <tbody>[TR]
[TD="width: 305"]Row Labels[/TD]
[TD="width: 129"]> 5 Days[/TD]
[TD="width: 27"]NA[/TD]
[TD="width: 96"]Uncorrected[/TD]
[TD="width: 93"]Within 1 Day[/TD]
[TD="width: 101"]Within 5 Days[/TD]
[TD="width: 91"]Grand Total[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Claims - Credit & Surety Claims[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]1[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Claims - Long Tail[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]3[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Claims - Short Tail[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]6[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]7[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Claims - Workers Compensation - Claims[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]3[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]5[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Policy Support Services - Credit Control[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]6[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]11[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Policy Support Services - Elders[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]6[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]8[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Policy Support Services - Financial Institution[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]2[/TD]
[TD="bgcolor: transparent"]6[/TD]
[TD="bgcolor: transparent"]1[/TD]
[TD="bgcolor: transparent"]11[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]Policy Support Services - Motorcycle[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]4[/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"] [/TD]
[TD="bgcolor: transparent"]4[/TD]
[/TR]
[TR]
[TD]Grand Total[/TD]
[TD]2[/TD]
[TD]19[/TD]
[TD]3[/TD]
[TD]23[/TD]
[TD]3[/TD]
[TD]50[/TD]
[/TR]
</tbody>[/TABLE]

Thank you
Bryan
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Try
Code:
   Range("A5", Range("A" & Rows.Count).End(xlUp).Offset(-1)).Select
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,177
Members
453,021
Latest member
Justyna P

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