+ Reply to Thread
Results 1 to 5 of 5

tough if then problem

  1. #1
    Registered User
    Join Date
    04-09-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    tough if then problem

    Hi all, I have a long list of codes and each of these codes correlates to a monetary value. I have been trying to use the if/then function but my problem is that the codes are alpha-numeric so it keeps thinking that it is a cell:

    ie
    Code Value
    A085 $30
    Z080 $20
    K123 $50

    I have all the codes listed and am hoping to automatically enter the Value, when I enter =if(A1=A085,30) it always says false because cell A1 never equals cell A85.

    Any help in how to get around this would be amazing.

    Cheers,

    DL

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: tough if then problem

    Use VLOOKUP.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-09-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: tough if then problem

    But the problem i'm having is that excel recognizes A085 as a cell and not a code.

  4. #4
    Registered User
    Join Date
    04-09-2013
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: tough if then problem

    Never mind, I understand what you mean now!! thanks

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,050

    Re: tough if then problem

    wrap the A085 in "" "A085"
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ 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