View Single Post
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default Need help with a formula

One way

=A1*VLOOKUP(A1,{0,0;7,4;11,3;32,2},2)

where A1 is your e, 7 stands for 6, 11 stands for 10 and 32 for 31
4 is what you multiply with for 6, 3 for 10 and 2 31
replace those with your numbers.


--

Regards,

Peo Sjoblom

"Bryan J Bloom" <Bryan J wrote in message
...
I need to subtract 2 different sets of dates to get a total amount of

days.
Eg: (a-b)+(c-d) = e
I then need to take the total (e) and multiply by 3 different integers if
the total (e) is greater than 6 days,10 days and 31days.
This helps me keep track how long my company trucks are out of a Rail/Ship
Yard.
I can't seem to get the dates to subtract and get an integer(regular
number). and I'm dead lost on the greater than stuff.
Of course the boss drops this on me on my first day.
Any help or comments will come highly appreciated.
Thank you