+ Reply to Thread
Results 1 to 2 of 2

Incorrect result for AND fucntion - HELP!

  1. #1
    Registered User
    Join Date
    04-26-2017
    Location
    India
    MS-Off Ver
    2013
    Posts
    14

    Incorrect result for AND fucntion - HELP!

    Hi guys!

    I'm working on a worksheet which relies on lists to select and distribute items and their values across various divisions. (refer workbook - result sheet)

    In column A an item is selected along with a division in column B. The items are in different currencies which are fetched using a vlookup referenced to another sheet.

    Now it needs to be calculated how much value of items is assigned to each division and each currency. To do this, I'm using a combination of IF and AND functions to evaluate if the selected division and currency matches and then pull the value.
    The sheet enclosed is a simple representation of the setup - the actual sheet is much more complex but premise is the same.

    The issue is that if no division is selected in column B, then the AND function evalutes the '0' value of the blank cell in column B to be equal to the division in column G,K and O and enters the value under all 3 divisions. I cant reproduce the problem in the attached workbook but still gives the error in the original even though the formulas are exactly the same.

    =IF(AND($B3=$G$1,$D3=G$2),$C3,"-")
    Attached Files Attached Files

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,619

    Re: Incorrect result for AND fucntion - HELP!

    Are you sure it's because of no company selected? Or rather because of column C being empty?
    If there is an empty cell, it is treated by excel as 0. You may use for instance:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    to deal with it.

    If that's not the case please do a copy of your real file, delete MOST of the data, replace delicate data with dummy values and attach such prepared file
    Best Regards,

    Kaper

+ 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. [SOLVED] Incorrect result from look-up
    By Marvo in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 09-03-2018, 01:13 AM
  2. [SOLVED] Incorrect result from formula
    By Marvo in forum Excel Formulas & Functions
    Replies: 26
    Last Post: 10-18-2013, 04:34 AM
  3. Incorrect Result WIth Vlookup
    By Jenn68 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-15-2012, 10:10 PM
  4. isblank & vlookup formula returns #n/a result and incorrect result
    By helpmeplease333 in forum Excel General
    Replies: 5
    Last Post: 05-06-2012, 11:41 PM
  5. Pls explain incorrect result
    By borisov_artiom in forum Excel General
    Replies: 1
    Last Post: 03-12-2009, 07:12 AM
  6. [SOLVED] vlookup based on random result returns incorrect result
    By rickat in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 12-05-2005, 09:20 AM
  7. Median result used in formula gives incorrect result
    By vlatham in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-21-2005, 12:05 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