+ Reply to Thread
Results 1 to 17 of 17

Ignoring letters behind numbers

  1. #1
    bj
    Guest

    RE: Ignoring letters behind numbers

    If there are not more than 2 letters following and no preceding letters
    Try something like
    =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")),
    IF(ISNUMBER( value(left(B7,len(b7)-1) ),(IF(value(left(B7,len(b7)-1)>4000,
    VLOOKUP(value(left(B7,len(b7)-1),Sheet1!A2:B263,2), "S")), IF(ISNUMBER(
    value(left(B7,len(b7)-2) ),(IF(value(left(B7,len(b7)-2)>4000,
    VLOOKUP(value(left(B7,len(b7)-2),Sheet1!A2:B263,2), "S")),"S"))))

    (I lost track of the parenthsis. You may need more or less of them at the
    end)


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  2. #2
    Jason Morin
    Guest

    RE: Ignoring letters behind numbers

    Try:

    =IF(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1>4000,VLOOKUP(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1,Sheet1!A2:B263,2),"S")

    HTH
    Jason
    Atlanta, GA


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  3. #3
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    I think this returns what you want:

    =LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))

    Note: commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    If there will be more that 10 characters, change the 10's to an appropriate
    number.

    Does that help?

    --
    Regards,
    Ron


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  4. #4
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    Actually, my first formula only strips text off the back of the cell value.

    I believe this formula actually DOES do what you want:

    =IF(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10)))))>4000,
    VLOOKUP(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))),Sheet1!A2:B263,2), "S")

    Note: Commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    --
    Regards,
    Ron


  5. #5
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    Actually, my first formula only strips text off the back of the cell value.

    I believe this formula actually DOES do what you want:

    =IF(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10)))))>4000,
    VLOOKUP(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))),Sheet1!A2:B263,2), "S")

    Note: Commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    --
    Regards,
    Ron


  6. #6
    bj
    Guest

    RE: Ignoring letters behind numbers

    If there are not more than 2 letters following and no preceding letters
    Try something like
    =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")),
    IF(ISNUMBER( value(left(B7,len(b7)-1) ),(IF(value(left(B7,len(b7)-1)>4000,
    VLOOKUP(value(left(B7,len(b7)-1),Sheet1!A2:B263,2), "S")), IF(ISNUMBER(
    value(left(B7,len(b7)-2) ),(IF(value(left(B7,len(b7)-2)>4000,
    VLOOKUP(value(left(B7,len(b7)-2),Sheet1!A2:B263,2), "S")),"S"))))

    (I lost track of the parenthsis. You may need more or less of them at the
    end)


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  7. #7
    Jason Morin
    Guest

    RE: Ignoring letters behind numbers

    Try:

    =IF(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1>4000,VLOOKUP(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1,Sheet1!A2:B263,2),"S")

    HTH
    Jason
    Atlanta, GA


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  8. #8
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    I think this returns what you want:

    =LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))

    Note: commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    If there will be more that 10 characters, change the 10's to an appropriate
    number.

    Does that help?

    --
    Regards,
    Ron


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  9. #9
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    Actually, my first formula only strips text off the back of the cell value.

    I believe this formula actually DOES do what you want:

    =IF(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10)))))>4000,
    VLOOKUP(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))),Sheet1!A2:B263,2), "S")

    Note: Commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    --
    Regards,
    Ron


  10. #10
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    I think this returns what you want:

    =LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))

    Note: commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    If there will be more that 10 characters, change the 10's to an appropriate
    number.

    Does that help?

    --
    Regards,
    Ron


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  11. #11
    Jason Morin
    Guest

    RE: Ignoring letters behind numbers

    Try:

    =IF(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1>4000,VLOOKUP(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1,Sheet1!A2:B263,2),"S")

    HTH
    Jason
    Atlanta, GA


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  12. #12
    bj
    Guest

    RE: Ignoring letters behind numbers

    If there are not more than 2 letters following and no preceding letters
    Try something like
    =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")),
    IF(ISNUMBER( value(left(B7,len(b7)-1) ),(IF(value(left(B7,len(b7)-1)>4000,
    VLOOKUP(value(left(B7,len(b7)-1),Sheet1!A2:B263,2), "S")), IF(ISNUMBER(
    value(left(B7,len(b7)-2) ),(IF(value(left(B7,len(b7)-2)>4000,
    VLOOKUP(value(left(B7,len(b7)-2),Sheet1!A2:B263,2), "S")),"S"))))

    (I lost track of the parenthsis. You may need more or less of them at the
    end)


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  13. #13
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    Actually, my first formula only strips text off the back of the cell value.

    I believe this formula actually DOES do what you want:

    =IF(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10)))))>4000,
    VLOOKUP(--(LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))),Sheet1!A2:B263,2), "S")

    Note: Commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    --
    Regards,
    Ron


  14. #14
    Ron Coderre
    Guest

    RE: Ignoring letters behind numbers

    I think this returns what you want:

    =LEFT(A1,MAX((--ISNUMBER(--MID(A1,ROW(1:10),1))*ROW(1:10))))

    Note: commit that array formula by pressing [Ctrl]+[Shift]+[Enter]

    If there will be more that 10 characters, change the 10's to an appropriate
    number.

    Does that help?

    --
    Regards,
    Ron


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  15. #15
    Jason Morin
    Guest

    RE: Ignoring letters behind numbers

    Try:

    =IF(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1>4000,VLOOKUP(LEFT(B7,LEN(B7)-(ISERROR(RIGHT(B7)*1)+ISERROR(MID(B7,LEN(B7)-1,1)*1)))*1,Sheet1!A2:B263,2),"S")

    HTH
    Jason
    Atlanta, GA


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  16. #16
    bj
    Guest

    RE: Ignoring letters behind numbers

    If there are not more than 2 letters following and no preceding letters
    Try something like
    =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")),
    IF(ISNUMBER( value(left(B7,len(b7)-1) ),(IF(value(left(B7,len(b7)-1)>4000,
    VLOOKUP(value(left(B7,len(b7)-1),Sheet1!A2:B263,2), "S")), IF(ISNUMBER(
    value(left(B7,len(b7)-2) ),(IF(value(left(B7,len(b7)-2)>4000,
    VLOOKUP(value(left(B7,len(b7)-2),Sheet1!A2:B263,2), "S")),"S"))))

    (I lost track of the parenthsis. You may need more or less of them at the
    end)


    "jeremy via OfficeKB.com" wrote:

    > This funtion works for me, if there are no letters behind numbers
    >
    > =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")
    >
    > but some of the numbers have a letter or two behind them, which I want to
    > ignore (eg. 4123HG i want to recognize as 4123)....
    >
    > Any Help?
    >
    > jeremy
    >
    > --
    > Message posted via http://www.officekb.com
    >


  17. #17
    jeremy via OfficeKB.com
    Guest

    Ignoring letters behind numbers

    This funtion works for me, if there are no letters behind numbers

    =IF(ISNUMBER(B7),(IF(B7>4000, VLOOKUP(B7,Sheet1!A2:B263,2), "S")), "S")

    but some of the numbers have a letter or two behind them, which I want to
    ignore (eg. 4123HG i want to recognize as 4123)....

    Any Help?

    jeremy

    --
    Message posted via http://www.officekb.com

+ 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