+ Reply to Thread
Results 1 to 4 of 4

Assign numerical values to text codes

  1. #1
    Bridget
    Guest

    Assign numerical values to text codes

    I need to assign values to a text string so that the larger of the two
    columns of text (or the higher numeric value) can be found. Can this be
    done? If so, how?

    An example of what I need to do is:
    C = 1
    B = 2
    A = 3
    AA = 4
    AAA = 5
    SCS = 6
    NRT = 7

  2. #2
    Ron Rosenfeld
    Guest

    Re: Assign numerical values to text codes

    On Mon, 18 Apr 2005 14:09:06 -0700, "Bridget"
    <[email protected]> wrote:

    >I need to assign values to a text string so that the larger of the two
    >columns of text (or the higher numeric value) can be found. Can this be
    >done? If so, how?
    >
    >An example of what I need to do is:
    >C = 1
    >B = 2
    >A = 3
    >AA = 4
    >AAA = 5
    >SCS = 6
    >NRT = 7


    Simplest would be a lookup table. Use HELP to explore VLOOKUP (or HLOOKUP)


    --ron

  3. #3
    z.entropic
    Guest

    RE: Assign numerical values to text codes

    nested IF statements are the simplest way:

    =IF(A1="A",1,IF(A1="B",2),...)

    i.e., replace FALSE with your next test.

    z.entropic

    "Bridget" wrote:

    > I need to assign values to a text string so that the larger of the two
    > columns of text (or the higher numeric value) can be found. Can this be
    > done? If so, how?
    >
    > An example of what I need to do is:
    > C = 1
    > B = 2
    > A = 3
    > AA = 4
    > AAA = 5
    > SCS = 6
    > NRT = 7


  4. #4
    CLR
    Guest

    Re: Assign numerical values to text codes

    Put your text strings in J1 down to J7, and their numbers in K1 down to
    K7.........add on the bottom if you have more...........
    Then, assuming one of your test columns is A, put this formula in B1 and
    copy down

    =VLOOKUP(A1,J:K,2,FALSE)

    do the same for the other column(s).........but change the "A1" as
    appropriate......
    Go to the empty cell just below your numbers in column B and click on the
    AutoSum icon in the toolbar........this will sum the column for you.........

    Vaya con Dios,
    Chuck, CABGx3


    "Bridget" <[email protected]> wrote in message
    news:[email protected]...
    > I need to assign values to a text string so that the larger of the two
    > columns of text (or the higher numeric value) can be found. Can this be
    > done? If so, how?
    >
    > An example of what I need to do is:
    > C = 1
    > B = 2
    > A = 3
    > AA = 4
    > AAA = 5
    > SCS = 6
    > NRT = 7




+ 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