Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 . |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need help with a lookup or if statement | Excel Worksheet Functions | |||
If statement or lookup statement not sure | Excel Worksheet Functions | |||
If or lookup Statement | Excel Discussion (Misc queries) | |||
Multiple If (Lookup?) Statement | Excel Worksheet Functions | |||
Lookup/if statement? | Excel Discussion (Misc queries) |