+ Reply to Thread
Results 1 to 2 of 2

❁❁Looping, Adding, and Highlighting❁❁ ~ An Excel Adventure

  1. #1
    Registered User
    Join Date
    12-18-2012
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    1

    ❁❁Looping, Adding, and Highlighting❁❁ ~ An Excel Adventure

    Hello

    Firstly, I want to thank you guys for this forum. Excel can be difficult for a lot of people (including me ) so it is great that there is a community here willing to help people out.

    Anyway, I have a big spreadsheet that I've been trying to work with, and because of the size I just can't manage manually within any reasonable time.

    So this is what I need a macro or script to do...

    Locations Durations
    Location 1 .06758
    Location 2 .61322
    Location 3 2.7891
    Location 4 20.285
    Location 5 17.398
    Location 6 4.6711
    Location 7 .06466

    I would like the durations column to be added in a loop, so add B2 to B3, add this to B4...etc...until the value is or exceeds "30". Once that happens, I would like the next row with a red location (in the first column) to be highlighted, let's say yellow.

    So in the above example, it would add .06758, .61322, 2.7891, 20.285, and 17.398. Since that exceeds 30, it would then find the next red "location" and highlight that whole row. In this case that would be the row of Location 7, as Location 4 appeared too early (not yet equal/exceeding 30). If Location 5 was red then that row would be highlighted yellow, because it exceeded or was equal to 17 on that red location's row.
    So Location 6 would not be counted because it was after 30 was equaled/exceeded and before the next red location.

    Red/yellow would just be the formatting in excel, how you can give cells colors.

    It would then start again from that highlighted row (Location 7), count its duration, and continue down the 5,000+ rows I have the same way.

    Thank you so much for your help!

  2. #2
    Valued Forum Contributor
    Join Date
    11-02-2012
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    564

    Re: ❁❁Looping, Adding, and Highlighting❁❁ ~ An Excel Adventure

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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