+ Reply to Thread
Results 1 to 4 of 4

IF Function to do a calculation help

  1. #1
    Registered User
    Join Date
    04-03-2012
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    2

    IF Function to do a calculation help

    I have a roadspeed of a car in m/s in cell A1 and a drop down menu of different units in C1 (which unclude mph and kmh).

    I have used the following IF function in B1 to convert the number to the unit selected from the dropdown menu:

    =IF(C1="mph","=A1*2.23693629",IF(C1="kmh","=A1*3.6"))

    However say if kmh was selected, B1 literally just shows =A1*3.6 and does not actually calculate it.

    Is there away to get it to calculate it instead of just showing the text message?

    Cheers

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: IF Function to do a calculation help

    Just remove the " around your calculations. Putting something in " " converts it to text.

    And remove the = within the =IF() statement. Like this:

    =IF(C1="mph",A1*2.23693629,IF(C1="kmh",A1*3.6))
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Registered User
    Join Date
    04-03-2012
    Location
    england
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: IF Function to do a calculation help

    Ha its worked, didn't realise it was that simple.

    Thanks for that

  4. #4
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: IF Function to do a calculation help

    No problem!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1