Lookup Statement (2007)

S

sojuman

I have a spreadsheet users will be entering monthly mileage readings into.
Column D could have a value of M (miles) or K (kilometers). If K is used, I
would like it to convert the difference between the starting and ending
readings into miles.

D9 = K
H9 = Starting kilometers (45612)
I9 = Ending Kilometers (45700)
J9 = resulting difference in miles (I9-H9)*.6 result (52.8 miles)

Is this possible.

Thanks
 
D

Daryl S

Sojuman -

Yes, use this in cdll J9:

IF(D9 = "K",(I9-H9)*.6,(I9-H9))

If D9 is "K", then it will calculate miles from kilometers, else it will
only subtract the miles.
 
L

LPS

You could try an "IF" statement in F9 (or wherever you want the result
displayed):

=if(d9="M","",(I9-H9)*.6)

Which basically says that if I9 has an "M" in it, do nothing; if it is not
an "M" then do the arithemtic.

Does that help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top