Logical test with Text string

Thanks Thanks:  0
Likes Likes:  0
Results 1 to 5 of 5

Thread: Logical test with Text string

  1. #1
    New Member
    Join Date
    Mar 2013
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Logical test with Text string

     
    Greetings again from the excel noob.

    I have a list of spirits, some are 750ml and some are 1 liter. I want a logical test that returns a price in ounces. Something along the lines of IF(cell contains 750, return contents of cell w/price*25.35, if not return contents of cell with price*33.8)

    Hopefully that makes sense.

    Thanks in advance

  2. #2
    Board Regular S.H.A.D.O.'s Avatar
    Join Date
    Sep 2005
    Location
    London (UK)
    Posts
    1,854
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Logical test with Text string

    Do you mean something like this:

    Code:
    =CONCATENATE(A1," = ",IF(A1=750,A1*25.53,IF(A1<>750,A1*33.8)))
    Change A1 to suit.

    I hope this helps!
    Kind regards,
    S.H.A.D.O.
    -∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-∏-
    12:45, restate my assumptions.
    (1) Mathematics is the language of nature.
    (2) Everything around us can be represented and understood through numbers.
    (3) If you graph the numbers of any system, patterns emerge. Therefore, there are patterns, everywhere in nature.

  3. #3
    MrExcel MVP VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,651
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Logical test with Text string

    Try something like this

    Sheet1

     ABC
    175010253.5
    2100010338

    Spreadsheet Formulas
    CellFormula
    C1=IF(A1=750,B1*25.35,B1*33.8)
    C2=IF(A2=750,B2*25.35,B2*33.8)


    Excel tables to the web >> Excel Jeanie HTML 4
    HTH, Peter
    Please test any code on a copy of your workbook.

  4. #4
    New Member
    Join Date
    Mar 2013
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Logical test with Text string

    Thank you but will this work if for instance what is in the cell is something like Bulleit Rye 750? Or do I have to create a separate column to list the 750 ml and liters?

  5. #5
    MrExcel MVP VoG's Avatar
    Join Date
    Jun 2002
    Location
    127.0.0.1
    Posts
    63,651
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Logical test with Text string

      
    The easiest would be a separate column.
    HTH, Peter
    Please test any code on a copy of your workbook.

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com