![]() |
Lookup Statement (2007)
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 |
Lookup Statement (2007)
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. -- Daryl S "sojuman" wrote: 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 |
Lookup Statement (2007)
In J9 you want:
=(i9-h9)*if(d9="k",0.6214,1) Regards, Fred "sojuman" wrote in message ... 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 |
Lookup Statement (2007)
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? -- LPS "sojuman" wrote: 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 |
Lookup Statement (2007)
All,
Thanks for all the suggestions. Works like a champ. Tony "Fred Smith" wrote: In J9 you want: =(i9-h9)*if(d9="k",0.6214,1) Regards, Fred "sojuman" wrote in message ... 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 . |
Lookup Statement (2007)
Glad to help. Thanks for the feedback.
Regards, Fred "sojuman" wrote in message ... All, Thanks for all the suggestions. Works like a champ. Tony "Fred Smith" wrote: In J9 you want: =(i9-h9)*if(d9="k",0.6214,1) Regards, Fred "sojuman" wrote in message ... 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 . |
All times are GMT +1. The time now is 11:18 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com