+ Reply to Thread
Results 1 to 10 of 10

Avoid circular reference in lookup

  1. #1
    Registered User
    Join Date
    03-12-2021
    Location
    Bahrain
    MS-Off Ver
    365
    Posts
    28

    Avoid circular reference in lookup

    Hello,
    Thank you for looking at my post.

    I send out a manifest of items to customers consisting the date sent and ID of the item. The customer sends a 'Received' file back and I do a lookup from my manifest to the Received file.
    What I'm trying to achieve is for if any ID for a given date is on the Received file, then mark everything sent on that date as received. So far my attempts produce circular references so I was looking for a way to do this with or without array formulas, helper columns etc.

    I've attached an example file showing my current lookup formula and also the desired result.
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Avoid circular reference in lookup

    How about this?

    =IF(ISNA(MATCH("yes",$C$2:$C$21,0)),"NO","YES")
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Avoid circular reference in lookup

    What is wrong with the formula in C2 of sheet 1???
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    43,986

    Re: Avoid circular reference in lookup

    Ah. I think I see now... It would help if your sample showed a few "No" responses as well!!

    =IF(ISNUMBER(MATCH(A2,Received!A:A,0)),"Yes","No")

    copied down.

  5. #5
    Registered User
    Join Date
    03-12-2021
    Location
    Bahrain
    MS-Off Ver
    365
    Posts
    28

    Re: Avoid circular reference in lookup

    Hi there, Thanks for the replies.

    Is there any way it can be by the date: So if any ID is received for a given date, all the IDs for that date are received.

    So in the attached image:
    The ID's for 02/07/2021 should remain "no" because none of them are received.

    For 09/07/2021, because ID #4 is received, all the ID's for 09/07/2021 should show "YES".
    Attached Images Attached Images

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,152

    Re: Avoid circular reference in lookup

    Try

    =IF(COUNTIFS(Received!A:A,Sheet1!A2),"YES","no")

    Updated
    Attached Files Attached Files
    Last edited by JohnTopley; 07-13-2021 at 06:46 AM.

  7. #7
    Registered User
    Join Date
    03-12-2021
    Location
    Bahrain
    MS-Off Ver
    365
    Posts
    28

    Re: Avoid circular reference in lookup

    I'm sorry. I've screwed up the example.

    So, I'm looking up the ID not the date.
    So going back to the image ID #4 on 09/07/2021. If that ID is found anywhere on the Received sheet, then all the entries for 09/07/2021 should be received.
    That's where I was getting the circular ref.

  8. #8
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Avoid circular reference in lookup

    Please provide an updated sample sheet to avoid confusion.

  9. #9
    Registered User
    Join Date
    03-12-2021
    Location
    Bahrain
    MS-Off Ver
    365
    Posts
    28

    Re: Avoid circular reference in lookup

    Here's the revised example.
    So verbally the logic is: If an ID is found in Received, then all the other ID's for the same date should also be marked as found.
    Attached Files Attached Files

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: Avoid circular reference in lookup

    This should do it:

    =IF(SUM(COUNTIFS($A$2:$A$21,A2,$B$2:$B$21,Received!$A$2:$A$3))=0,"NO","YES")
    Attached Files Attached Files
    Last edited by AliGW; 07-13-2021 at 10:31 AM.

+ 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] Add Value To Cell/Column and Avoid Circular Reference
    By Jim Clayton in forum Excel General
    Replies: 5
    Last Post: 02-19-2019, 03:26 PM
  2. Replies: 2
    Last Post: 02-23-2014, 06:06 PM
  3. [SOLVED] How to avoid circular reference
    By CHoedeman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-03-2013, 10:07 AM
  4. Technique to avoid circular reference
    By smjpl in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-04-2012, 10:34 AM
  5. Trying to Avoid a Circular Reference
    By dpmarkey in forum Excel General
    Replies: 1
    Last Post: 05-27-2010, 02:07 PM
  6. If statement to avoid Creating Circular Reference
    By Tim H in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-22-2005, 01:37 AM
  7. Need to avoid a circular reference...
    By Denise in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2005, 04:06 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