Move to next cell when value reached

Sheene1976

New Member
Joined
Aug 20, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi everyone, first post so apologies if this type of thing has been covered previously.

As per my screenshot, I have a list of the NFL stadiums (2019/2020 season I think) and the distances in miles between each stadium. My columns are as follows:-

A - Start point
B - Target point
C - distances between two points in miles
D - Rolling total of miles between points
F - miles I have to cover before I get to the next stop
H - Stop reached - formula you can see

What I want to do is have something set up where when I get to the next stop, my distances stop counting and move to the next one e.g. going from Seattle to San Francisco, I have 733.2 miles to go before I get to the 49ers stadium so when cell F2 reaches 0, that cell stops counting but F3 still counts down until it reaches 0, etc.
 

Attachments

  • exercise (2).jpg
    exercise (2).jpg
    236.4 KB · Views: 18

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Note that the formula:
Excel Formula:
=IF($L$2>D2,0,D2-$L$2)
can be simplified a little to this:
Excel Formula:
=MAX(D2-$L$2,0)
 
Upvote 0

Forum statistics

Threads
1,215,494
Messages
6,125,139
Members
449,207
Latest member
VictorSiwiide

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top