Column Total with Macros & Imported Access Data

Mr Sam

New Member
Joined
Aug 3, 2011
Messages
1
I have one sheet were I import data from MS Access. I import two different sets of data, on set on rows 3-16 and another set on rows 17-25. When there isn't enough data to fill all of rows 3-16 I delete the unused rows and delete the header row, row 17. I am trying to use the macro below to find the total of column C (There is data in all the rows of column C), but it doesn't seem to recognize any of the data that is originally from rows 17-25. Any ideas would be appreciated.

Range("E65536").End(xlUp).Offset(2, -2).FormulaR1C1 = "=SUM(R2C3:R[-2]C)"<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
With Range("E65536").End(xlUp).Offset(2, -2).Borders(xlEdgeTop)<o:p></o:p>
.LineStyle = xlContinuous<o:p></o:p>
.Weight = xlThin<o:p></o:p>
End With<o:p></o:p>
With Range("E65536").End(xlUp).Offset(2, -2).Borders(xlEdgeBottom)<o:p></o:p>
.LineStyle = xlDouble<o:p></o:p>
.Weight = xlThick<o:p></o:p>
End With<o:p></o:p>
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Forum statistics

Threads
1,224,606
Messages
6,179,865
Members
452,948
Latest member
UsmanAli786

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