Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Finding Totals...Continued

Hi,

First of all I am very sorry for forgetting to attach my
code to my previous email so here it is:

For Each categ1 In Category.Cells
If (categ1.Value < "") Then
If (categ1.Value = categ1.Offset(1, 0).Value) Then
'working on later

ElseIf (categ1.Offset(1, 0).Value < "") And
(categ1.Value < categ1.Offset(1, 0).Value) Then
categ1.Activate
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown
ElseIf (categ1.Offset(1, 0).Value = "") And (start 1)
Then
'I used the start counter to skip the first empty
cell
'the last row total
categ1.Activate
ActiveCell.Offset(1, 0).Rows
("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown

CatTot = CatTot + 1
'CatTot is my counter for CatTot to use for my
formula
categ1.Offset(1, 0).Value = "Total "
categ1.Offset(1, 1).Value = categ1.Value
'diff2 is how much to move right of the cell

categ1.Offset(1, diff2).Activate
ActiveCell.FormulaR1C1 = "=SUM(R[" + Str(-CatTot)
+ "]C:R[-1]C)"
End If
start = start + 1
CatTot = CatTot + 1
ElseIf (categ1.Value = "") And (start 1) Then
categ1.Value = "Total "
categ1.Offset(0, 1).Value = categ1.Offset(-
1, 0).Value

categ1.Offset(0, diff2).Activate
ActiveCell.FormulaR1C1 = "=SUM(R[" + Str(-
CatTot) + "]C:R[-1]C)"
'Exit For

End If
Next categ1

Thank you in advance,
LC
Reply
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
Average With < Continued hamricka[_7_] Excel Worksheet Functions 4 August 20th 09 05:02 PM
Excel Function . . . Continued Charlie Excel Discussion (Misc queries) 3 June 23rd 09 05:41 PM
Median continued Bony Pony[_2_] Excel Discussion (Misc queries) 12 December 10th 08 06:53 AM
Pivot Totals: Group totals different from Grand totals PsyberFox Excel Discussion (Misc queries) 1 February 13th 08 06:16 PM
If then statement continued! Add to distribution list without opening Excel Discussion (Misc queries) 1 October 20th 06 11:02 PM


All times are GMT +1. The time now is 05:56 AM.

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

About Us

"It's about Microsoft Excel"