Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 135
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.misc
LPS LPS is offline
external usenet poster
 
Posts: 108
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9
Default 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


.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,389
Default 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


.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with a lookup or if statement Franci Excel Worksheet Functions 4 October 30th 09 05:02 AM
If statement or lookup statement not sure Renegade40 Excel Worksheet Functions 2 January 18th 09 06:11 AM
If or lookup Statement Chey Excel Discussion (Misc queries) 2 October 24th 08 08:33 PM
Multiple If (Lookup?) Statement Teri Excel Worksheet Functions 7 January 31st 07 06:44 PM
Lookup/if statement? Connie Excel Discussion (Misc queries) 5 August 16th 05 11:57 PM


All times are GMT +1. The time now is 01:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"