+ Reply to Thread
Results 1 to 27 of 27

Formulas not working as intended - not sure why

Hybrid View

  1. #1
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Formulas not working as intended - not sure why

    Hi all,

    I have received previous help with the formulas that exist in this file, and it seemed to have worked initially, though it appears there's something not working as intended and I am not sure why.

    Formula in Question on SALES HISTORY & SPA ANALYSIS TAB:

    Cell A3 - =UNIQUE(FILTER('Custom List Data Entry'!C3:P5000,ISNUMBER(MATCH('Custom List Data Entry'!C3:C5000,'Custom List Data Entry'!A3:A5000,0))))

    This is supposed to return the data from the "Custom List Data Entry" table range C3:P5000 if the values in column C3 and A3 match.

    While it appears to do so for some lines, it doesn't appear to be catching everything that should match. Example of a match it's catching is on the Custom List Data Entry tab, C31 matches with A143 and pulls the data from referenced table (C3:P5000) and appears on the SALES HISTORY & SPA ANALYSIS TAB on row 3 (as intended). An example of where it doesn't appear to be working but appears to meet the formulas logic is on the Custom List Data Entry tab, C187 matches with A22 but it doesn't appear on any row on the SALES HISTORY & SPA ANALYSIS TAB.


    The other formula that's on SALES HISTORY & SPA ANALYSIS TAB is in cell O3 =LET(f,FILTER('Custom List Data Entry'!A3:B3300,NOT(ISNUMBER(MATCH('Custom List Data Entry'!A3:A3300,'Custom List Data Entry'!C3:C3300,0)))),FILTER(f,(INDEX(f,,1)<>" ")*(INDEX(f,,1)<>0)))

    This formulas intention is to return in columns O & P the exact data in columns A & B on the 'Custom List Data Entry' tab when there is NO match between columns A & C on 'Custom List Data Entry' tab. In my example where the previous formula appears to not be working (should be finding a match on 'Custom List Data Entry tab in C187 and A22') these lines data is being returned as not finding a match in columns A & C on 'Custom List Data Entry' tab.

    Maybe these formulas are at odds with each other? Maybe it's a formatting issue? HELP! Thank you.

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

    Re: Formulas not working as intended - not sure why

    on the Custom List Data Entry tab, C187 matches with A22
    No, it doesn't:

    A22: 78621056297
    C187: 61601310702

    I can't see anything wrong here, and as that's the only 'error' you've pointed out, there's nothing more that I can do at this juncture.

    It would be helpful if you would at least highlight where you think there are other issues in the workbook.
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Thanks for the response.

    I highlighted cell A22 = 61601310702 and C187 = 61601310702. Am I missing something here?

    I highlighted the above cells in yellow. I also highlighted an example of where I believe the formula is working in green for cross reference. I added notes with the yellow or green highlights for reference.  
    Last edited by AliGW; 02-22-2024 at 05:43 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    From the workbook you attached to post #1:

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    22
    78621056297
    Sheet: SALES HISTORY & SPA ANALYSIS


    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    C
    187
    61601310702
    Sheet: Custom List Data Entry

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    Really not clear what you mean as I can see it (highlighted) in the list.

    AliGW on MS365 Beta Channel (Windows 11) 64 bit

    A
    B
    3
    01899758175 ARL LV1 LOW-VOLT-MTG-BRACKET
    4
    06739600331 ABB 331P WIRECONNXTPNONWING ORGNO18
    5
    06739600331 MAR 331P 18-14-ORG-WIRE-CONN
    6
    06739600333 MAR 333P 18-10-YEL-WIRE-CONN
    7
    06739601331 MAR 331M WIRE-CONN
    8
    61601310700
    ABB CPC075 1-PIECE CBL/PIPE CLP 3/4
    9
    61601310702 ABB CPC100 1-PIECE CBL/PIPE CLP 1IN
    10
    61601311153 S-S B1400-10PG GALV-CHANNEL
    11
    61601311163 ABB B1400HS-10PG HS CHNL 14GA 1-5/8
    12
    61601311163 S-S B1400HS-10PG GALV-SLOTCHNL
    13
    62253843820 ABB CI820-D REWORK SUPP BRACKET MAX
    14
    62253843820 T-B CI820-D SW-BOX-SUPPORT-BRACKET
    15
    62258805183 EAT 1HD362 3P-60A-SFTY-SW
    16
    62258805187 CSE 1HD363 3P-100A-SFTY-SW
    17
    62258805190 CSE 1HD364 3P-200A-SFTY-SW
    18
    62258805190 EAT 1HD364 3P-200A-SFTY-SW
    19
    62398036067 HMN CSKO12124 12X12X4IN-SCR-CVR
    20
    78331021481 GRN 430 1PLY-6500FT-PULLLINE-B
    21
    78599190781 STL IT100SC 0-ANTI-SHORT-BAG/35
    22
    78621024803 T&B H104-3/8X10EGC HANGER-ROD
    23
    78621056297 T&B A1200S10PGC 1-5/8X1-5/8-SLOT-CH
    24
    25
    WHY ISN'T 61601310702 BE APPEARING ABOVE LIKE 01899758175 IS?
    Sheet: SALES HISTORY & SPA ANALYSIS

  6. #6
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Here's what I'm seeing from the post #1 download? row 9 has 61601311153?

    Attachment 860514

  7. #7
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    This screenshot format you did here would be easier to use to communicate. Do you mind sharing how you posted this? I'll go through all the advanced features now to see if I can figure it out.

  8. #8
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    00
    You know what.....I think this happened to me earlier today and I couldn't figure out what happened. Row 8 that shows 61601310700 actually wasn't there either, but after doing some "clicking around" (AKA I have no idea what triggered this) it just appeared in the list shown here. I still don't know why it's showing all the way to the right of the column.
    Last edited by AliGW; 02-22-2024 at 06:06 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

  9. #9
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Further to post 9, here's another example of something that did not make it into the array on 'SALES HISTORY & SPA..". On the 'Custom List Data Entry' A25 showing 61601310708 and C191 showing 61601310708. Not in the above.
    Last edited by AliGW; 02-22-2024 at 06:07 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead.

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

    Re: Formulas not working as intended - not sure why

    That's not what is showing in the workbook attached to post #3.

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

    Re: Formulas not working as intended - not sure why

    This screenshot format you did here would be easier to use to communicate. Do you mind sharing how you posted this?
    No - for this we need a workbook. Just cut down the sample workbook to a reasonable amount of data (10-20 rows ONLY) that show the problem. I am not going to trawl through 100s of rows of data as it currently stands - sorry.

  12. #12
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    I understand and I appreciate you sticking around with me. I am still trying to learn how to make this easy for the pros such as yourself. Sometimes I only have words! ... LOL. I will send something shortly.

  13. #13
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Ok, here's the worksheets. The lines highlighted in yellow on the 'Custom Data Entry List' A & C are matches that are not returning into the table array on 'SALES HISTORY & SPA ANALYSIS'

    I noticed that there are some duplicate values in column C on 'Custom Data Entry List' (EG. 62253823406 in C302 & C303). I would like to return both of these matches to the table array 'SALES HISTORY & SPA ANALYSIS'.

  14. #14
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    I still don't know why it's showing all the way to the right of the column.
    It isn't - that's the number in the row above it.

    Anything left-aligned is TEXT, anything right-aligned is a real NUMBER.

  15. #15
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    I am waiting for a sensibly cut-down workbook as requested in post #10.

    Administrative Note re. Forum Guideline #2:

    Please don't quote whole posts, especially when you are responding to the one immediately preceding your own - it's just clutter and rarely necessary.

    If you are responding out of sequence, it is usually enough just to mention the helper's user name (e.g @AliGW).

    If you do need to quote, limit the quoted section just to the section to which you wish to draw your helper's attention or a direct question to which you wish to respond.

    For normal conversational replies, try using the QUICK REPLY box below or the REPLY button instead of REPLY WITH QUOTE.

  16. #16
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    OK - thanks. Simplify it as much as you can without losing what you are trying to demonstrate.

    I have a hunch that this is related to numbers not being numbers, but text (or vice versa), as I mentioned in post #11.

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    This is just the same sheet with rows hidden - that's not what I asked for.

    I can tell you that this:

    =A3=C213

    returns FALSE for the first SIX rows at least (I have not tested further).

    This means that those values do NOT match, even though you think they do. Column A contaiuns REAL NUMBERS and column C contains TEXT.

    You could try this:

    =UNIQUE(FILTER('Custom List Data Entry'!C3:P5000,ISNUMBER(MATCH(--'Custom List Data Entry'!C3:C5000,'Custom List Data Entry'!A3:A5000,0))))

    UNTESTED as I don't have time at the moment.

  18. #18
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Sorry, I'm not fully understanding what you need from me. Thanks for the tip on the FALSE return, I will start there to try and figure this out. The formula you gave me doesn't seem to work so far but user error is very possible. I am having issues finding a consistent format on my lists... they don't want to all change to one format type. Some seem to either stay a NUMBER or TEXT or GENERAL.

  19. #19
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    Further - when both columns are set to GENERAL formatting, you can clearly see the difference in alignment (see post #11 for explanation).

  20. #20
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    You can't CHANGE a column's underlying format using those format options. They are just a way of viewing the data, not formatting it. The GENERAL option merely shows that the data in A is NOT in the same format as that in C, therefore those rows do NOT match.

    What I want from you is this: a cut-down workbook with just a few rows of data - some rows that work and some that don't. I do NOT want ALL of the source data there.

    Give me 20 rows of results and 30 rows from the source data (rows that are meant to appear - make sure there are some that do and some that don't). Put these and your formula into a new workbook. Then I'll look again.

  21. #21
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Ok... I hope I did this right!

    Sales History Data Entry broken to two lists. Green is what is returning to the 'SALES HISTORY & SPA ANALYSIS' array and Orange is what is not but should match. On the 'Sales History Data Entry' page, I ran the TRUE/FALSE test in columns K & L and it is checking out.

    Did I do this correctly? Fingers crossed!

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

    Re: Formulas not working as intended - not sure why

    It's what I said - the items that are not matching don't match. All values in C are TEXT, but those in A are a mixture of text and numbers. Those that are numbers don't match.

    This should resolve it:

    =UNIQUE(FILTER('Custom List Data Entry'!C2:P5001,ISNUMBER(MATCH('Custom List Data Entry'!C2:C5001,VALUETOTEXT('Custom List Data Entry'!A2:A1721),0))))

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  23. #23
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    Seen, but no reply ...

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  24. #24
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    Thanks Ali! This solves this issue! Now, there's one more thing that has happened and I suspect it's going to be similar. I am not sure if I should start a new thread though? I will post it here but if this is soething that should go on it's own thread please let me know.

    Formula '=LET(f,FILTER('Custom List Data Entry'!A3:B3300,NOT(ISNUMBER(MATCH('Custom List Data Entry'!A3:A3300,'Custom List Data Entry'!C3:C3300,0)))),FILTER(f,(INDEX(f,,1)<>" ")*(INDEX(f,,1)<>0)))" in cell O3 on ''SALES HISTORY & SPA ANALYSES was originally intended to filter and return columns A&B on 'Custom List Data Entry' where column A did not match with any values in column C.
    Instead, O3 (the formula) seems to be returning all values in column A&B and not filtering.

    EG. Cells O2:P2 on ''SALES HISTORY & SPA ANALYSES' are returning "62001330000" & "EMT EMT-CONDUIT-1/2 1/2 16MM" even though on sheet 'Custom List Data Entry' cell A3 ("62001330000") SHOULD match BUT actually DOESN'T based on what you taught me... EG. =A3=C213 = FALSE).

    Do we have to add the same VALUETOTEXT somewhere in this formula? I tried it in a few spots within the formula no avail...

  25. #25
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    So you need to make the same adjustment to that formula as I gave above for the first one. I’m just off to bed - have a go and I’ll look in and see how you’ve got in tomorrow.

  26. #26
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2504 (Windows 11 Home 24H2 64-bit)
    Posts
    91,066

    Re: Formulas not working as intended - not sure why

    Try this:

    =LET(f,FILTER('Custom List Data Entry'!A3:B3300,NOT(ISNUMBER(MATCH(VALUETOTEXT('Custom List Data Entry'!A3:A3300),'Custom List Data Entry'!C3:C3300,0)))),FILTER(f,(INDEX(f,,1)<>" ")*(INDEX(f,,1)<>0)))

    Maybe you forgot the final bracket for the VALUETOTEXT function?

    Hopefully that's it now.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, if you have not already done so, remember that you can thank anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

  27. #27
    Registered User
    Join Date
    04-01-2023
    Location
    Canada
    MS-Off Ver
    Microsoft Office 365
    Posts
    30

    Re: Formulas not working as intended - not sure why

    I hadn't had much sleep the last two days so I slept in on this! Thanks for solving this one yet again. I am taking a beginner course on excel right now and were just getting into "nesting" and how that works.

+ 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] IF OR statement not working as intended
    By chris01395 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-27-2020, 09:50 AM
  2. Using cell reference in formulas not working like intended
    By BrentSmits in forum Excel Formulas & Functions
    Replies: 20
    Last Post: 07-10-2018, 06:31 AM
  3. PowerPivot not working as intended?
    By fingerstyle in forum Excel General
    Replies: 11
    Last Post: 10-22-2017, 08:35 PM
  4. [SOLVED] Msgbox not working as intended
    By ks100 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-24-2013, 09:12 AM
  5. [SOLVED] VLOOKUP not working as intended
    By RAS 2112 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-12-2013, 08:58 AM
  6. Replies: 6
    Last Post: 04-29-2011, 09:11 AM
  7. macro not working as intended
    By Michael A in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-06-2005, 10:06 PM

Tags for this Thread

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