Updating a table with Excel formula -
i have 2 working days dates, first_date
, second_date
.
i have data table decreasing working date:
second_date value 1 second_date - 1 value 2 second_date - 2 value 3 .... .... first_date value n first_date -1 value n + 1 .... ....
the table doesn't stop after first date.
i wanted plot value between first_date , second_date. i've found way dynamically choose x/y values: excel variables x values
however, have problem, when choose date out of bound of data table doesn't plot i've asked (which normal). update data table depending on dates.
the dates in data table built: =second_date
in first row (d4
), =+workday(d4,-1)
in second row, , used click , drags tool build other rows recursively.
is there way stop recursion first date without vba? how build such table formulas?
without using vba way generate data dynamically can think generate data conditionally on falling inside time frame set between 2 dates. said require 3 months data "empty" cells not impact performance significantly.
specifically change formula d5 onward following (assuming d4=second_date):
=if(iferror(workday(d4,-1)>=first_date,false),workday(d4,-1),#n/a)
use similar conditional logic generate values in second column. want make sure if date condition not met outputs #n/a value. important when generating graph (more on below).
you can generate graph including maximum dimensions of table (for max 3 months: ~60 workdays). when change dates include #n/a operator on dates outside range. graph ignore these datasets adapting scale creating graph date ranges user wants.
if inclusion of #n/a concern there further options. can create conditional formatting makes font white #n/a's cosmetic resolution. or can configure chart ignore empty cells , replace in above formula "" #n/a, achieving same result.
hope helps. please let me know if further clarification required or if not meet specific needs. cheers
Comments
Post a Comment