+ Reply to Thread
Results 1 to 8 of 8

If formula- I hope someone can help me

Hybrid View

Shazzney If formula- I hope someone... 11-09-2008, 08:20 AM
mrice Try this... ... 11-09-2008, 08:40 AM
Shazzney That doesn't work sorry,... 11-09-2008, 09:15 AM
Ron Coderre Replacing text with numbers 11-09-2008, 09:21 AM
mrice Works for me -please see the... 11-09-2008, 09:28 AM
Shazzney That does work, I should be... 11-09-2008, 09:38 AM
Ron Coderre Replacing text with numbers 11-09-2008, 09:44 AM
Shazzney Thats fab all sorted. ... 11-09-2008, 09:57 AM
  1. #1
    Registered User
    Join Date
    11-09-2008
    Location
    United Kingdom
    Posts
    4

    If formula- I hope someone can help me

    I hope someone can help me.

    I have to put in some pupil results on a spreadsheet, reading 3A, 3B, 3C or 4A etc.

    I need a formula so that a graph or sorting sees the A as .8 the B as .5 and the C as .2.

    I have been going round in circles all morning and can't make a formula work!

    I would be so happy if someone could help me with this please.

    Thanks in advance

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Try this...

    =IF(RIGHT(A1,1)="A",LEFT(A1)+0.8,IF(RIGHT(A1,1)="B",LEFT(A1)+0.5,IF(RIGHT(A1,1)="C",LEFT(A1)+0.2)))
    Martin

  3. #3
    Registered User
    Join Date
    11-09-2008
    Location
    United Kingdom
    Posts
    4
    Quote Originally Posted by mrice View Post
    Try this...

    =IF(RIGHT(A1,1)="A",LEFT(A1)+0.8,IF(RIGHT(A1,1)="B",LEFT(A1)+0.5,IF(RIGHT(A1,1)="C",LEFT(A1)+0.2)))
    That doesn't work sorry, thanks for trying

  4. #4
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Replacing text with numbers

    With
    A1 containing 2-chars....a digit and a letter...eg 4B.

    This formula replaces:
    A with .8
    B with .5
    C with .2
    and coverts the A1 text to the respective numeric value
    B1: =LEFT(A1,1)+LOOKUP(RIGHT(A1,1),{"A";"B";"C"},{".8";".5";".2"})
    In the above example, 4B is converted to 4.5

    Is that something you can work with?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

  5. #5
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Works for me -please see the attachment.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    11-09-2008
    Location
    United Kingdom
    Posts
    4
    That does work, I should be able to work with that. Could I put in a command for row above rather than left?

    Many thanks

  7. #7
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Replacing text with numbers

    If you're referring to the formula I posted....

    With A1 containing the digit-letter text

    The same formula in A2 still works:
    A2: =LEFT(A1,1)+LOOKUP(RIGHT(A1,1),{"A";"B";"C"},{".8";".5";".2"})
    Does that help?

  8. #8
    Registered User
    Join Date
    11-09-2008
    Location
    United Kingdom
    Posts
    4
    Thats fab all sorted.

    Thanks a million

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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