Countdown cells until an event in adjacent column

zeke333

New Member
Joined
May 22, 2019
Messages
3
How do I countdown the number of cells until an event in an adjacent column? I only want to look 7 days ahead.

DATEIRRIGATE (GALLONS)DAYS UNTIL IRRIGATE
1/1/2010--4
1/2/2010--3
1/3/2010--2
1/4/2010--1
1/5/20105000
1/6/2010--3
1/7/2010--2
1/8/2010--1
1/9/20105200
1/10/2010--3
1/11/2010--2
1/12/2010--1
1/13/20102100
cont...

<tbody>
</tbody>
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
Hi
Welcome to the board

What are the "--" that appear in your table

- are they the text value "--"
or
- are they for ex. the number zero that you hid with a number format?
 
Upvote 0
Treat them as zeros, a zero hidden as "--", or a text value, whichever way is easier for you to present a solution.

They are the result of an equation that either specifies an irrigation volume or not. I can make them show up as 0 if it makes a difference in your solution.

Hi
Welcome to the board

What are the "--" that appear in your table

- are they the text value "--"
or
- are they for ex. the number zero that you hid with a number format?
 
Upvote 0
If the "--" is a real text value then you just have to look for the next number value, like in C2:

=MATCH(TRUE,INDEX(ISNUMBER(B2:$B$1000),),0)-1

Copy the formula down


if, however, the "--" is just a number format and the cell value is the number value zero, then look for the next number value bigger than zero, like in C2:

=MATCH(TRUE,INDEX(B2:$B$1000>0,),0)-1

Copy the formula down

Remark:
Amend the B2:$B$1000 range if 1000 rows is not convenient to your case.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,511
Messages
6,114,054
Members
448,543
Latest member
MartinLarkin

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