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!![]()
Bookmarks