+ Reply to Thread
Results 1 to 8 of 8

IF function based on the calculations of another cell

  1. #1
    Registered User
    Join Date
    11-26-2020
    Location
    Springfield, MO
    MS-Off Ver
    WPS Office
    Posts
    4

    IF function based on the calculations of another cell

    hi all, i cant get my functions to work.

    S5 is 77 and AD5 is a if/then function. but if i use a function in S5 to get that 77 then AD5 is reading the formula, not the value of 77.

    i want AD5 to calculate a pertage based on the answer to S5 so i can use it for markup for pricing. so if S5 is 77 then the if/then would be IF(S5<100,"1.23". it works perfectly as long as i type in 77. but the result i get in AD5 is all over the board depending on where i put the "", whether i leave them out all together, put them around some but not others or all of it, etc. no matter what i do, i cannot get AD5 to answer the correct 1.23 unless i physically type in 77 into S5
    Last edited by partsguy; 11-26-2020 at 10:55 AM.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: IF function based on the calculations of another cell

    Well, "1.23" is text, as opposed to 1.23 which is numeric. No reason why S5<100 should give you anything different to 77<100, unless the formula in S5 is giving an answer other than what you think it is.

    Please post a sample workbook.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    11-26-2020
    Location
    Springfield, MO
    MS-Off Ver
    WPS Office
    Posts
    4

    Re: IF function based on the calculations of another cell

    thanks for your help, here is a sample file. S is the answer to AM as determined by a match between AL and A. then AD is supposed to determine my 'markup' based on the value in S (if S11 is 51 then AD should be 1.23). from there, my cost (S), 51 is multiplied by my markup (AD), 1.23 ...add in the shipping (AC), 11 and that is the $ i sell my product (73.73 b4 the rounding to 73.99).
    Attached Files Attached Files

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: IF function based on the calculations of another cell

    Here are the amended formulae.

    AM2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied down. This corrects for column AM being Text, not Numeric

    AD2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    copied down. As explained, "1.5" is Text, as opposed to just 1.5 which is Numeric.

    Column AM, as mentioned, has Text values, not Numeric values. Therefore, your VLOOKUP is returning a Text value, although it "looks like" a Number. Your formula in column AD will also return Text values that look like Numbers.

  5. #5
    Registered User
    Join Date
    11-26-2020
    Location
    Springfield, MO
    MS-Off Ver
    WPS Office
    Posts
    4

    Re: IF function based on the calculations of another cell

    wow! thank you so much, i cant believe it was that easy. the (2) -- (dash? hyphen?) b4 the vlookup....what does that mean? if its too detailed to explain, no worries. but thank you for helping me

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: IF function based on the calculations of another cell

    It's called a double negative. Typically used to coerce Boolean values (True/False) to (1/0). In this case, it is being used as a mathematical operation to convert a text number to a numeric value. It's like multiplying your value by -1 twice.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  7. #7
    Registered User
    Join Date
    11-26-2020
    Location
    Springfield, MO
    MS-Off Ver
    WPS Office
    Posts
    4

    Re: IF function based on the calculations of another cell

    thank you again!

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: IF function based on the calculations of another cell

    You're welcome. Thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 08-05-2020, 10:33 PM
  2. [SOLVED] Performance calculations from last cell in column upwards based on value in another cell
    By jprlimey in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-22-2017, 04:20 PM
  3. [SOLVED] Different calculations based upon word in cell
    By Mopatop in forum Excel General
    Replies: 3
    Last Post: 07-15-2015, 06:03 PM
  4. Calculations based off formula from another cell
    By Blackhawks in forum Excel General
    Replies: 14
    Last Post: 07-09-2014, 11:38 AM
  5. User defined function based upon page of calculations
    By Squash_Pro in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-02-2008, 10:28 PM
  6. Calculations Based on Cell Format
    By assyrian47 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-15-2007, 03:13 PM
  7. Calculations based on adjacent cell values
    By Jack in forum Excel General
    Replies: 4
    Last Post: 06-10-2006, 09:45 AM

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