How do I use a logical IF statement with TEXT in EXCEL

Discussion in 'Microsoft Excel Worksheet Functions' started by Guest, Jun 1, 2006.

  1. Guest

    Guest Guest

    I am working in Excel. I am trying to place a numerical value in a cell if
    another cell has the text HPU.

    For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".

    Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    knows maybe this can not be done.
     
    Guest, Jun 1, 2006
    #1
    1. Advertisements

  2. Guest

    Guest Guest

    on B2

    =if(isnum(search("hpu",d4)),40,0)

    hope it helps
    regards from Brazil
    Marcelo

    "SchnidRoCK" escreveu:

    > I am working in Excel. I am trying to place a numerical value in a cell if
    > another cell has the text HPU.
    >
    > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    >
    > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    > knows maybe this can not be done.
     
    Guest, Jun 1, 2006
    #2
    1. Advertisements

  3. Guest

    Guest Guest

    Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
    worked. I copied and pasted the function from your response, so I know that
    I got the function right.

    "Marcelo" wrote:

    > on B2
    >
    > =if(isnum(search("hpu",d4)),40,0)
    >
    > hope it helps
    > regards from Brazil
    > Marcelo
    >
    > "SchnidRoCK" escreveu:
    >
    > > I am working in Excel. I am trying to place a numerical value in a cell if
    > > another cell has the text HPU.
    > >
    > > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    > > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    > >
    > > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    > > knows maybe this can not be done.
     
    Guest, Jun 1, 2006
    #3
  4. SchnidRoCK,

    There is no worksheet function "isnum"

    =IF(ISNUMBER(SEARCH("hpu",D4)),40,0)

    HTH,
    Bernie
    MS Excel MVP


    "SchnidRoCK" <> wrote in message
    news:...
    > Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
    > worked. I copied and pasted the function from your response, so I know that
    > I got the function right.
    >
    > "Marcelo" wrote:
    >
    >> on B2
    >>
    >> =if(isnum(search("hpu",d4)),40,0)
    >>
    >> hope it helps
    >> regards from Brazil
    >> Marcelo
    >>
    >> "SchnidRoCK" escreveu:
    >>
    >> > I am working in Excel. I am trying to place a numerical value in a cell if
    >> > another cell has the text HPU.
    >> >
    >> > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    >> > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    >> >
    >> > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    >> > knows maybe this can not be done.
     
    Bernie Deitrick, Jun 1, 2006
    #4
  5. Guest

    Guest Guest

    sorry the mistake, ;-) my excel is in brazilian Portuguese...

    regards

    "Bernie Deitrick" escreveu:

    > SchnidRoCK,
    >
    > There is no worksheet function "isnum"
    >
    > =IF(ISNUMBER(SEARCH("hpu",D4)),40,0)
    >
    > HTH,
    > Bernie
    > MS Excel MVP
    >
    >
    > "SchnidRoCK" <> wrote in message
    > news:...
    > > Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
    > > worked. I copied and pasted the function from your response, so I know that
    > > I got the function right.
    > >
    > > "Marcelo" wrote:
    > >
    > >> on B2
    > >>
    > >> =if(isnum(search("hpu",d4)),40,0)
    > >>
    > >> hope it helps
    > >> regards from Brazil
    > >> Marcelo
    > >>
    > >> "SchnidRoCK" escreveu:
    > >>
    > >> > I am working in Excel. I am trying to place a numerical value in a cell if
    > >> > another cell has the text HPU.
    > >> >
    > >> > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    > >> > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    > >> >
    > >> > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    > >> > knows maybe this can not be done.

    >
    >
    >
     
    Guest, Jun 1, 2006
    #5
  6. Guest

    Guest Guest

    That fixed my problem thank you so much......

    "Marcelo" wrote:

    > sorry the mistake, ;-) my excel is in brazilian Portuguese...
    >
    > regards
    >
    > "Bernie Deitrick" escreveu:
    >
    > > SchnidRoCK,
    > >
    > > There is no worksheet function "isnum"
    > >
    > > =IF(ISNUMBER(SEARCH("hpu",D4)),40,0)
    > >
    > > HTH,
    > > Bernie
    > > MS Excel MVP
    > >
    > >
    > > "SchnidRoCK" <> wrote in message
    > > news:...
    > > > Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
    > > > worked. I copied and pasted the function from your response, so I know that
    > > > I got the function right.
    > > >
    > > > "Marcelo" wrote:
    > > >
    > > >> on B2
    > > >>
    > > >> =if(isnum(search("hpu",d4)),40,0)
    > > >>
    > > >> hope it helps
    > > >> regards from Brazil
    > > >> Marcelo
    > > >>
    > > >> "SchnidRoCK" escreveu:
    > > >>
    > > >> > I am working in Excel. I am trying to place a numerical value in a cell if
    > > >> > another cell has the text HPU.
    > > >> >
    > > >> > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    > > >> > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    > > >> >
    > > >> > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    > > >> > knows maybe this can not be done.

    > >
    > >
    > >
     
    Guest, Jun 2, 2006
    #6
  7. Guest

    Guest Guest

    you are welcome, thanks for the feedback

    "SchnidRoCK" escreveu:

    > That fixed my problem thank you so much......
    >
    > "Marcelo" wrote:
    >
    > > sorry the mistake, ;-) my excel is in brazilian Portuguese...
    > >
    > > regards
    > >
    > > "Bernie Deitrick" escreveu:
    > >
    > > > SchnidRoCK,
    > > >
    > > > There is no worksheet function "isnum"
    > > >
    > > > =IF(ISNUMBER(SEARCH("hpu",D4)),40,0)
    > > >
    > > > HTH,
    > > > Bernie
    > > > MS Excel MVP
    > > >
    > > >
    > > > "SchnidRoCK" <> wrote in message
    > > > news:...
    > > > > Thank you Marcelo - but what appears in B2 is #NAME?. So I do not think it
    > > > > worked. I copied and pasted the function from your response, so I know that
    > > > > I got the function right.
    > > > >
    > > > > "Marcelo" wrote:
    > > > >
    > > > >> on B2
    > > > >>
    > > > >> =if(isnum(search("hpu",d4)),40,0)
    > > > >>
    > > > >> hope it helps
    > > > >> regards from Brazil
    > > > >> Marcelo
    > > > >>
    > > > >> "SchnidRoCK" escreveu:
    > > > >>
    > > > >> > I am working in Excel. I am trying to place a numerical value in a cell if
    > > > >> > another cell has the text HPU.
    > > > >> >
    > > > >> > For example: Cell D4 has the text string "75hp Diesel HPU", I want $40.00
    > > > >> > to be placed in Cell B2. This is based on the Cell D4 having the text "HPU".
    > > > >> >
    > > > >> > Do I use compare, IF, IS or what. Excel Help did not help me too much. Who
    > > > >> > knows maybe this can not be done.
    > > >
    > > >
    > > >
     
    Guest, Jun 2, 2006
    #7
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. christopherp

    Trying to reduce # of logical tests in "if" statement

    christopherp, Jul 28, 2004, in forum: Microsoft Excel Worksheet Functions
    Replies:
    4
    Views:
    190
    Aladin Akyurek
    Jul 28, 2004
  2. Guest

    Want to change the color of a true/false logical statement with i.

    Guest, Feb 19, 2005, in forum: Microsoft Excel Worksheet Functions
    Replies:
    2
    Views:
    132
    Gord Dibben
    Feb 19, 2005
  3. ECH123

    Help!!! - logical function for someone not very logical

    ECH123, May 11, 2009, in forum: Microsoft Excel Worksheet Functions
    Replies:
    6
    Views:
    321
    Ron@Buy
    May 11, 2009
  4. ECH123

    Help!!! - logical function for someone not very logical

    ECH123, May 11, 2009, in forum: Microsoft Excel Worksheet Functions
    Replies:
    0
    Views:
    154
    ECH123
    May 11, 2009
  5. BG Mark

    test if a logical statement and use the answer within an if statem

    BG Mark, Feb 24, 2010, in forum: Microsoft Excel Worksheet Functions
    Replies:
    9
    Views:
    237
    BG Mark
    Mar 4, 2010
Loading...

Share This Page