LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default Creating a total line

Im trying to Have a total line that is created below the last line of data.
I never know how many records there are going to be each month here is the
code that i would like to intergrate it with.

Sub NetPIlIQ()

Dim rng As Range
Dim rng1 As Range
Dim rng2 As Range
Dim rng3 As Range
Dim rng4 As Range
With Worksheets("TOEPIEXP")
Set rng = Range("A1").CurrentRegion
rng.AutoFilter Field:=24, Criteria1:="0"
Set rng2 = .AutoFilter.Range
Set rng2 = rng2.Offset(1, 0).Resize( _
rng2.Rows.Count - 1)
Set rng3 = .Range("B:B,E:E,V:V,X:X,AD:AD").EntireColumn
Set rng1 = Intersect(rng2.EntireRow, rng3)
End With
Set rng4 = Worksheets("NetPILIQ") _
..Cells(Rows.Count, 1).End(xlUp)(2)
If rng4.Row < 6 Then
Set rng4 = Worksheets("NetPILIQ").Range("A6")
rng1.Copy rng4
End If
Selection.AutoFilter 'removes autofilter
End Sub

Any help would be great.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200609/1

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a total percentage from coloured cells 1cainr Excel Worksheet Functions 1 January 24th 11 10:56 PM
Equals Sub Total Line Jennifer Excel Worksheet Functions 1 June 19th 09 05:27 AM
Creating a formula that calculates a total cell Growers Excel Discussion (Misc queries) 4 August 1st 06 09:47 PM
Sort creating total errors excel idiot Excel Discussion (Misc queries) 7 January 16th 05 03:21 PM
Total Line in Report Soniya[_2_] Excel Programming 0 January 6th 04 06:29 AM


All times are GMT +1. The time now is 02:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"