+ Reply to Thread
Results 1 to 3 of 3

And or problem

  1. #1
    Registered User
    Join Date
    08-15-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    43

    And or problem

    Hello,

    I want to do a formula that gives the results below.

    IF:
    OWE102 does not have a letter or -1 after it and the invoice number begins with a P or 2 or S or L then the result would be 15
    OWE102 does not have a letter or -1 after it and the invoice number begins with a C or B then the result would be 30
    OWE102 does have a letter or -1 after it and regardless of the invoice number then the result would be 0

    At present the formula returns the result of 0 or value as seen below.

    IF(OR(RIGHT(A3,2)="-1",CODE(RIGHT(A3,1))>=65),"")*IF(LEFT(B3,1)="2","15",IF(LEFT(B3,1)="S","15",IF(LEFT(B3,1)="P","15",IF(LEFT(B3,1)="C","30",IF(LEFT(B3,1)="B","30",IF(LEFT(B3,1)="L","15"))))))

    OWE102 P0000 0 15
    OWE102 26200 0 15
    OWE102 S36200 0 15
    OWE102 L0000 0 15
    OWE102 C0000 0 30
    OWE102 B16200 0 30

    OWE102A P0000 #VALUE! 0
    OWE102A-1 26200 #VALUE! 0
    OWE102B S36200 #VALUE! 0
    OWE102B-1 C0000 #VALUE! 0
    OWE102C B16200 #VALUE! 0

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: And or problem

    try
    =IF(AND(ISNUMBER(RIGHT(A1,3)+0),OR(LEFT(B1)={"p","2","s","l"})),15,IF(AND(ISNUMBER(RIGHT(A1,3)+0),OR(LEFT(B1)={"c","b"})),30,0))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    08-15-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    43

    Re: And or problem

    Oooooooooooooooo you star. fixed first time thank you soooooooooo much.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 10-20-2013, 07:16 PM
  2. input box problem, cell filtering problem, result display while locking sheet
    By croozin in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2013, 08:52 AM
  3. Replies: 6
    Last Post: 05-28-2013, 05:08 PM
  4. Replies: 2
    Last Post: 01-22-2013, 07:09 AM
  5. Started out as an Access problem. Now an Excel problem
    By RobertM in forum Excel General
    Replies: 2
    Last Post: 04-26-2006, 02:35 PM

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