Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default totaling indented subsections


Hi there,

I have a list that has has a list of entries and sub entries in column
A.

Each sub entry is indented, as below
Column A --------------¬------Column B---¬
-(5 spaces)-ABING..............183427
-(7 Spaces)-ABING..............183423
-(7 Spaces)-PAVA.........................2
-(7 Spaces)-EURM.........................1
-(5 spaces)-AEGIS....................524
-(7 Spaces)-AEGIS....................524
-(5 spaces)-JAGA....................1000
-(7 Spaces)-JAGA.....................900
-(7 Spaces)-LEMA.....................100
-(7 Spaces)-GURM.....................15

I need to total the extra indented sections to see if the match the
less indented entry above them.
i.e. in the example above ABING and AEGIS would be correct, JAGA
wouldn't
as 183426 = 183423+2+1 and 524 = 524
but 1000 does not = 900+100+15.

Does anyone have any suggestions as to how I can speed this process up
rather than calculating every section manually?

Thanks in advance.
Steve


--
steev_jd
------------------------------------------------------------------------
steev_jd's Profile: http://www.excelforum.com/member.php...o&userid=33107
View this thread: http://www.excelforum.com/showthread...hreadid=564712

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default totaling indented subsections


Try this user defined function

Function Check(Cell As Range)
If Left(Cell, 7) = " " Then
Check = ""
Else
Counter = 1
Do While Left(Cell.Offset(Counter, 0).Value, 7) = " "
Total = Total + Cell.Offset(Counter, 1)
Counter = Counter + 1
Loop
If Total = Cell.Offset(0, 1) Then
Check = True
Else
Check = False
End If
End If
End Function

Paste this into a VBA module and type =CHECK(A1) into cell C1 and copy
down.


--
mrice

Research Scientist with many years of spreadsheet development experience
------------------------------------------------------------------------
mrice's Profile: http://www.excelforum.com/member.php...o&userid=10931
View this thread: http://www.excelforum.com/showthread...hreadid=564712

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
Excel is totaling wrong Daxy Excel Worksheet Functions 1 July 10th 06 07:38 PM
Totaling from seperate worksheets cgauvreau Excel Worksheet Functions 1 June 6th 06 07:50 PM
Formula for totaling column dbglass Excel Worksheet Functions 3 May 13th 06 08:26 PM
Having trouble totaling columns in excel 2003, always worked b4 rjmac Excel Worksheet Functions 1 June 24th 05 07:01 PM
in excel totaling weekly hours military time mel Excel Worksheet Functions 1 January 17th 05 04:24 PM


All times are GMT +1. The time now is 08:12 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"