excel - Copy value of cell to another cell to record vehicle mileage -



excel - Copy value of cell to another cell to record vehicle mileage -

i'm working on spreadsheet record vehicle mileage. i'd manually come in starting mileage in f6 , ending mileage in g6. i'd value of g6 automatically copied f7 , i'd come in ending mileage in g7- , on. problem have dealing weekends , holidays when 2 or 3 blank cells may occur. i've tried using =if(d9=""," ", g6), doesn't work.

i've tried function in vba: =if(d9=""," ",lastnonblankcell(g8:g39)) [d9 datefield] , ended 0's.

function lastnonblankcell(range excel.range) variant application.volatile lastnonblankcell = range.end(xldown).value end function

do need blank rows weekends or holidays? if not, set d8 formula =workday.intl(d7,1) re-create downwards far needed. if need allow holidays, see excel documentation workday.intl. list of dates contain workdays, ending mileage 1 row can copied downwards next no special handling.

this makes weekends , holidays harder see @ glance. can addressed using conditional formatting. setup formatting range d8:d<whatever>, utilize formula =d8>(d7+1), , set formatting whatever stands out you.

excel vba

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -