+ Reply to Thread
Results 1 to 2 of 2

Need a multi-step logical test

  1. #1
    Registered User
    Join Date
    08-30-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Need a multi-step logical test

    I need help with a logical test.

    I have a table of data with the following columns A through E:


    item_no item_desc_1 item_desc_2 avg_cost last_cost

    The table consists of 49, 061 rows.
    There are long sets of item numbers that differ only in the last 3-5 digits but have the same text in "item_desc_1". (i.e.: the same item in different colors)

    I'm looking for items that have the same description but have average costs that are drastically different.
    I'm using as a rough checkpoint cost differentials of +/- 100%; if a given item is more than twice or less than half the cost of the same item in another color, I want to flag it for review.

    I tried the following logical test in excel, but it failed:

    IF(B3=B2 AND D3>D2*2 OR D3<D2*0.5),"Check Me","within margin")

    I realize now that I need to say something like

    if B3=B2, then perform test If D3>D2*2 OR D3<D2*0.5, else do nothing

    then say

    IF D3>D2*2 OR D3<D2*0.5),"Check Me","within margin"

    but I'm not sure how to do that.

  2. #2
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Need a multi-step logical test

    Perhaps this is what you are after
    =IF(AND(B3=B2,OR(D3>D2*2,D3<D2*0.5)),"Check Me","within margin")
    Life's a spreadsheet, Excel!
    Say thanks, Click *

+ 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