+ Reply to Thread
Results 1 to 4 of 4

Excel 2007 : Test one cell to determine value of another

  1. #1
    Registered User
    Join Date
    09-26-2010
    Location
    Connecticut, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Test one cell to determine value of another

    At work I am trying to update a sheet so that if one cell contains a specific string, in this case its the product name, if the string matches then the price column will automatically be set to the price for that product. I was trying something like =IF(A1='delrin', D1=3.25), but it doesnt seem to work, no matter how i format the string. Maybe a double equal sign is needed to test for equality like in C, or there is a different operator for testing string equality like 'eq' in perl. as you can probably tell, i am not very fluent in Windows, Unix is more my style, so i could really use some assistance. Thank you in advance for any help

  2. #2
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Test one cell to determine value of another

    =IF(A1="delrin", D1=3.25,"")

    Just use double quotes around the string.
    Which error do you get?

  3. #3
    Registered User
    Join Date
    09-26-2010
    Location
    Connecticut, United States
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Test one cell to determine value of another

    Thanks for getting back so quick. I'm not sure why that wasn't working for me at work, cause it is working on my home computer. I guess this is my follow up question: If the specified string does not match, is there any way to make it so that it doesnt affect the value in the price column? so if i am searching for "delrin" but the string is "80G33", i want the cell to be left blank so I can fill it in myself. Can i just leave off the third argument to IF? Because when i try that now, it shows up with the value "False". if i put in a blank, will i be able to overwrite that?

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Test one cell to determine value of another

    As your formula resides i n our cell, if you overwrite the cell's result, the fromula will be overwritten.
    You need to use VBA for that

+ 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