+ Reply to Thread
Results 1 to 2 of 2

sum in between two same name or color

  1. #1
    Registered User
    Join Date
    03-11-2017
    Location
    Darwin, Australia
    MS-Off Ver
    2016
    Posts
    1

    sum in between two same name or color

    Hi, I am doing a project. I have excel file with huge data. I want to add data between two randomly placed data between two rows with same color or same name.
    For example;
    total
    cost -
    home.....10
    car....20
    .
    cost -
    rent...20
    .
    .
    cost -
    .
    .
    cost
    .
    .
    .


    In which, i want to add from one cost data to another cost data continuously.
    I would appreciate any help!!!! Thanks!!!!

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: sum in between two same name or color

    The first formula goes in C3, then copy donw.

    Data Range
    A
    B
    C
    D
    1
    total
    2
    cost
    3
    car
    30
    =IF(A3="cost", SUM(INDEX($B$1:$B2, LOOKUP(2, 1/($A$1:$A2="cost"), ROW($A$1:$A2))):$B3),"")
    4
    home
    45
    5
    fuel
    34
    6
    cost
    109
    7
    car
    20
    8
    home
    16
    9
    fuel
    5
    10
    cost
    41
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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. Replies: 3
    Last Post: 05-30-2014, 10:24 AM
  2. Replies: 3
    Last Post: 01-08-2014, 03:56 PM
  3. Replies: 4
    Last Post: 12-29-2013, 11:41 PM
  4. Mouse rolls over to cell will change the tab color, font color and tp bold type
    By Rocky2013 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-20-2013, 10:36 AM
  5. Replies: 12
    Last Post: 09-18-2012, 03:13 PM
  6. Replies: 3
    Last Post: 07-08-2010, 06:48 PM
  7. [SOLVED] RE: Can't format cell color/text color in Office Excel 2003 in files .
    By albertaman in forum Excel General
    Replies: 0
    Last Post: 02-16-2006, 12:00 AM

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