View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Using List details within a sum

=SUM(TOTALHOURS*VLOOKUP(reg_number,reg_and_hours_l ist,2,FALSE))

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"forevertrying" wrote in message
...
Hi,

I am using a worksheet to record vehicle usage hours and the cost.

I have a simple worksheet. In the first column there is a drop down list
for
the registration numbers of the vehicles. The list this is drawn from is
on
the same page as the rest of the worksheet, just completely out of the
way.

In the 3rd Column I will be listing the job numbers and then entering the
hours for each job in the 5th column and onwards (5th and on is a columnn
per
day, 4th is a total for each job).

What I want the 2nd column to do is, dependant on the reg number selected,
to use the hourly cost (in the same list as the reg numbers) and multiply
it
by the hours I am entering.

I have no idea what formula to use or how to get it to notice the right
information. The reg number will not always be the same as some weeks some
of
the vehicles aren't used, otherwise I could have just listed all of them
and
put in a =SUM(TOTALHOURS*HOURLYCOST). This, however, if all vehicles are
not
being used, will not be particularly clear.

Can you help?

Thank you in advance