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: 115
Default -PLS CONSIDER THIS AS URGENT! HOW TO PUT SUM FORMULA IN VB FOR A CHANGING MULTI CATEGORY OR GROUP

For example I have say 24 tanks and their quantities in col_A and
col_B.. Based on the cargo nominations the group of tanks might
change. By using listbox I am able to get the selected tanks and their
quantities in col_A and col_B.
The difficulty I am facing is how to put it in VB -say- for the
following scenearios

say the quantites of the tanks start from row 10
1. If only one group with all 24 tanks as one group then the sum
formula in cell B34 should be sum(b10.b33)


2. If two group of tanks like first group 12 and second group 12 then
a sum forumla should be put in cell B22 as sum((b10.b21) and again
another sum formula at b35 as sum(b22.b34)

3. If three groups of tanks like first group 4, second group 8 and
third group 12 tanks then at the end of each group I need to put a sum
formula as mentioned in item-2 for each group.

4. If more than one group then after leaving a blank row after the
group is over one grand total sum formula adding the group like
=sum(b22+b35+b 44 or whatever is next group ending row)

col_A col_B
tanks

1 centr 1000 -starting from row 10
2 centr 5000
3 centr 4000
row 14 =sum(b10.b13) - end of first group and total

4 centr
5 centr
6 centr
row 18 =sum(b15.b17) - end of second group and total

7 centr
8 centr
9 centr
10 centr
11 centr
12 centr
row 25 =sum(b19.b24) - end of third group and total
row 26 =sum(sum at row 14+row18+row25) sum of all the groups.

Pls note I hv shown only 3 groups for example and it can even be 5 or
more groups which will be as announced by the company. How to
incorporate in the VB and to put the formulas and group totals
accordingly.

As I mentioned earlier I am due to proceed on vacation in another 4
days and would appreciate quick guidance to make it user friendly and
go. PLs help. I will be watching throughout the day constantly to work
and finish the program tonight itself.

 
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
Multi-Level Category Labels Jared Charts and Charting in Excel 1 December 4th 09 12:22 AM
How do I format multi-level category labels RGun Charts and Charting in Excel 1 November 6th 09 10:33 PM
Multi level category labels Tigerxxx Excel Discussion (Misc queries) 0 July 31st 09 07:28 AM
Multi-Level Category Gridlines GS80 Charts and Charting in Excel 3 January 24th 08 02:47 PM
representing multi category in a column chart hokum Charts and Charting in Excel 2 July 6th 05 01:03 PM


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