+ Reply to Thread
Results 1 to 4 of 4

VBA code to give summation value in level wise

  1. #1
    Registered User
    Join Date
    03-11-2018
    Location
    Michigan,USA
    MS-Off Ver
    MS Office 2010
    Posts
    34

    VBA code to give summation value in level wise

    Hi All
    I have this spreadsheet with parts in different levels. All level 5 part goes into level 4 and all level 4 goes into level3 and so on till Level 1. Now i need a vba code to add cost of all level 5 between any level 4 to populate it level 4 and all level 4 cost to show in level 3 (all 4 level under 3 till next 3). i have denoted in different color in the file attached. Kindly help me on this please.

    Thanks in advance
    Vinodh
    Attached Files Attached Files

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: VBA code to give summation value in level wise

    How about ...

    A
    B
    C
    D
    E
    F
    G
    1
    Lvl
    Cost
    Tot Cost
    2
    1
    whatever whatever whatever
    260
    F2: {=IF(E2, "", IF(A3 <= A2, "", SUM(E2:INDEX(E3:$E$32, MATCH(TRUE, A3:$A$32 <= A2, 0) - 1))))}
    3
    2
    whatever whatever whatever
    260
    4
    3
    whatever whatever whatever
    12
    5
    3
    whatever whatever whatever
    12
    6
    3
    whatever whatever whatever
    12
    7
    3
    whatever whatever whatever
    224
    8
    4
    whatever whatever whatever
    0
    9
    5
    whatever whatever whatever
    10
    4
    whatever whatever whatever
    11
    4
    whatever whatever whatever
    40
    12
    5
    whatever whatever whatever
    10
    13
    5
    whatever whatever whatever
    20
    14
    5
    whatever whatever whatever
    10
    15
    4
    whatever whatever whatever
    39
    16
    5
    whatever whatever whatever
    15
    17
    5
    whatever whatever whatever
    12
    18
    5
    whatever whatever whatever
    12
    19
    4
    whatever whatever whatever
    24
    20
    5
    whatever whatever whatever
    12
    21
    5
    whatever whatever whatever
    12
    22
    4
    whatever whatever whatever
    110
    23
    5
    whatever whatever whatever
    22
    24
    5
    whatever whatever whatever
    22
    25
    5
    whatever whatever whatever
    22
    26
    5
    whatever whatever whatever
    22
    27
    5
    whatever whatever whatever
    11
    28
    5
    whatever whatever whatever
    11
    29
    4
    whatever whatever whatever
    30
    4
    whatever whatever whatever
    11
    31
    5
    whatever whatever whatever
    11
    32
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    03-11-2018
    Location
    Michigan,USA
    MS-Off Ver
    MS Office 2010
    Posts
    34

    Re: VBA code to give summation value in level wise

    Hi Shg

    I tried the above code but not working for my application. I have attached the file what i intended to get. also they may be cases where i may
    add new row and add data .
    so in that case we need to have the cost in level 1 update automatically.

    Thanks
    Vinodh
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    03-11-2018
    Location
    Michigan,USA
    MS-Off Ver
    MS Office 2010
    Posts
    34

    Re: VBA code to give summation value in level wise

    Can anyone help me on this please

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. vba code for automating branch wise day wise amount to summary file
    By pranithpm in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-19-2014, 04:18 AM
  2. Conditional summation of a multi=level parts list
    By sheldh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-01-2014, 07:31 PM
  3. Why does simple Summation give #VALUE!?
    By Zarathrustra in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 10-29-2013, 03:51 AM
  4. Choose Value Between Two Point Totals and Give Level
    By vamosvikingos in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-30-2013, 01:55 AM
  5. Excel code to represent data from row wise to column wise
    By sreejeshc in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-12-2013, 03:45 AM
  6. [SOLVED] I want change the data row wise to coloum wise & coloumn wise to row wise.
    By satputenandkumar0 in forum Excel General
    Replies: 3
    Last Post: 12-20-2012, 08:34 AM
  7. Column-wise summation formula using VBA
    By dhou07 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-13-2012, 05:42 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1