View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default how do i build the macro i need?

Se response in excel.misc

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Stuart" wrote in message
...
i work for an accident management company part of what we do for our fleet
customers is provide them with reports. in these reports we have a column

in
an excel spreadsheet called downtime this uses the formulae =sum(H2-F2)

where
column H is date vehicle was returned and column F is date vehicle came
onsite the answer is displayed as an integer value in the downtime column.

however if onsite date is entered but no return date, or date returned
entered without an onsite date or neither field has a value we get the
folowing show up in downtime "#VALUE" this of course doesnt look good from
our customers point of view. is there a way to program excel that if

onsite
date is entered an no returned is uses the currentdate to work out how

long
vehicle has been there so far and if returned is entered but not onsite or

if
neither fields have values then the downtime will show an empty cell? also

we
need a way to filter out weekends from the calculations so only the amount

of
working days are displayed.