Excel dudes

Discussion in 'The Mainboard' started by skiedfrillet, Jul 31, 2018.

  1. Tiger Tiger Woods Y'all

    Tiger Tiger Woods Y'all Putting big balls in little holes, circa 1995
    Donor
    Clemson TigersGolden State WarriorsPGA

    Got it, that makes sense. You probably wont know the answer to this, but are those heights stored as values in excel or text? If its text, they will need to be converted to values and then easily enough we can cut out the ones you aren't interested in.

    I will PM you.
     
    Killy Me Please likes this.
  2. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    excel dudes I need some help
     
  3. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    The formula below has worked for me for other sheets, but this does help me right now because Column N contains duplicates that I don't care about. I only want to see where Column N matches any value in Column O

    =IF(COUNTIF($N$2:$O$58293, $N2)>1, "Duplicate", "Unique")

    How do I build a formula that tells me which values in Column N match up with a value in Column O. And it has to be *any* match like, this example:
    Column N = 33333
    Column O = 33333-4444
    That needs to classify as a match
     
  4. Name P. Redacted

    Name P. Redacted I have no money and I'm also gay
    Donor
    Kansas State WildcatsSeattle Kraken

    I don’t have an answer but this may help
    https://www.xelplus.com/if-function-with-wildcard-partial-text-match/
     
    THF and kinghill like this.
  5. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    Thanks but not smart enough to figure that out. I thought maybe this one would help but I can't figure out how to apply it to my need

    =IF(OR(ISNUMBER(SEARCH(“AT”,A5)),ISNUMBER(SEARCH(“DE”,A5))),”Europe”,””)
     
  6. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    upload_2021-6-15_22-35-35.png

    put this in A1 and fill down
    =IF(NOT(ISNA(VLOOKUP("*" & B1 & "*",$C$1:$C$4,1, FALSE))),"Duplicate","")
     
  7. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    Thanks Henry Blake I feel like I'm getting closer. Perhaps it would help to show you guys a sample dataset

    See attached image - I want to find any zip codes in column B that match the list of zip codes in column C. I had created column D thinking I'd throw a formula in there to accomplish this, but haven't figured it out yet.
     

    Attached Files:

  8. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    can you post a screenshot. Edit. Nm
     
  9. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    does the match have to be specific to the row or can the matching value be anywhere in the searched range? At first glance, I think you’re going to want to make a key and use xlookup. Or level up and download a trial version of Alteryx.
     
  10. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    The matching value can be anywhere in the searched range.
     
  11. Handcuffed

    Handcuffed A Succulent Chinese Meal
    Staff Donor
    Seattle MarinersOregon DucksPortland TimbersPortland Trail Blazers

    create a new column and use LEFT(B2,5) (then drag down) to get your first zip code column into the same format as your second one

    then you can just use any lookup/if function to check if column C data is contained within your new column
     
    kinghill, momux and racer like this.
  12. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    EDIT for elegance;


    =XLOOKUP(D2,$C$2:$C$15,$C$2:$C$15,"Unique",2,1)

    upload_2021-6-15_22-15-36.png
     
    #162 DriveByBBQ, Jun 15, 2021
    Last edited: Jun 15, 2021
    kinghill likes this.
  13. Drew Swinney Esq

    Drew Swinney Esq Successful Attorney in Atlanta
    Donor
    Clemson TigersAtlanta BravesCarolina PanthersGrateful DeadUnited States Men's National Soccer Team

    Try setting your countif criteria as a wildcard by wrapping in asterisks.

    "*"&$N2&"*"
     
    THF likes this.
  14. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    Yeah, left 5 or text to column by - then a1=b1 is what you want if t worried about that row matching. VL if it could be any in a range.
     
  15. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    My biggest pet peeve with excel is that the power is inefficient. It’s way more quick and easy to do 2 steps than it is to try and perfect a complex formula in many cases.
     
    THF and Henry Blake like this.
  16. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    What do you mean?
     
  17. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    This seems so easy but goddamn
     
  18. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    upload_2021-6-15_23-22-9.png

    put this in D2 and fill down and vlookup should work if you want to use that
    =IF(NOT(ISNA(VLOOKUP("*" & C2 & "*",$B$2:$B$12,-1, FALSE))),"Duplicate","")
     
    Drew Swinney Esq and kinghill like this.
  19. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    Was that what you needed? You're going to want to convert those text values to numbers as well.

    Also to fellow excel bros, I've found XLOOKUP is vastly superior to VLOOKUP for pretty much every application. VLOOKUP being extremely brittle and cumbersome.
     
    kinghill likes this.
  20. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    Fuck yes! That did it! Finally!

    I had to switch it around to this:

    =IF(NOT(ISNA(VLOOKUP("*" & N2 & "*",$O$2:$O$293,-1, FALSE))),"Duplicate","")

    fill down 58,000 rows and found 1420 matches yesssssssssssssssssssss this was it
     
    Capstone 88 and Henry Blake like this.
  21. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    I couldn't figure out how to apply your formula to what I needed. Kept getting errors. I've never used XLOOKUP before.

    Henry Blake's VLOOKUP worked so I'm rollin with that for now
     
    DriveByBBQ likes this.
  22. SD_Irish

    SD_Irish El Mas Chingon
    Donor
    Notre Dame Fighting IrishUSA RugbyUnited States Men's National Soccer TeamSan Diego Padres

    XLOOKUP is fantastic. I use that formula so much now in place of index- match and vlookups.

    Try it out. You won't be disappointed.
     
    DriveByBBQ and kinghill like this.
  23. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    Does a value of 11111 in N match a value of 11111 in O? Do you need that to match?

    I can't get that to work in my excel..

    Also, the column index (-1) may need to be 1 for consistency?
    upload_2021-6-16_0-0-16.png
     
  24. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    I do not need that to match, but, I just tested it. I added 11111 in N and O, and could not get it to match.
     
    Henry Blake likes this.
  25. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    I changed -1 to 1. There were no changes in the output.
     
  26. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    In the event that you do need 11111 in N to match O use:
    =IF(OR(NOT(ISNA(VLOOKUP("*" & N2 & "*",$O$2:$O$293,1, FALSE))),NOT(ISNA(VLOOKUP(N2,$O$2:$O$293,1, FALSE)))),"Duplicate","")
     
    kinghill likes this.
  27. Name P. Redacted

    Name P. Redacted I have no money and I'm also gay
    Donor
    Kansas State WildcatsSeattle Kraken

    Or just use python this excel syntax is cancer
     
  28. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    My goodness. I'm gonna look more into this XLOOKUP again. Have you used it?
     
  29. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    Awesome. I figured it out now. That worked! Had to just flip a bit around and made it like this:

    =XLOOKUP(N2,$O$2:$O$263,$O$2:$O$263,"Not Found",2,1)
     
    DriveByBBQ likes this.
  30. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    Henry Blake the XLOOKUP that DriveByBBQ posted worked. So thanks to TMB I have two solutions, both verified to have the same output:

    =XLOOKUP(N2,$O$2:$O$263,$O$2:$O$263,"Not Found",2,1)

    or

    =IF(OR(NOT(ISNA(VLOOKUP("*" & N2 & "*",$O$2:$O$293,1, FALSE))),NOT(ISNA(VLOOKUP(N2,$O$2:$O$293,1, FALSE)))),"Duplicate",""

    You guys are awesome thanks. Gonna try using XLOOKUP more.
     
    Henry Blake, SD_Irish and DriveByBBQ like this.
  31. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

    One problem with this is 32976-6800 in Column C will not match with a 32976 in Column D. I'd have to first trim Column C zip codes like Handcuffed said =LEFT(C2,5)
     
  32. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    I'll also recommend the excel crash course linked below from Wallstreet prep. Wallstreet investment banks make their interns take this course as a prerequisite. It's an incredible value at $39, lots of hacks (where I picked up XLOOKUP), the instructor is concise, and you can keep it as a reference. I'll still flip back to it if I'm stumped building out models.

    https://www.wallstreetprep.com/self-study-programs/excel-crash-course/
     
  33. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    Edit Check that. BRB.
     

    Attached Files:

  34. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    Yeah, so I inserted a column, did a text to column data parse using "-" as the delimitator and expanded the return array to include columns B and C. It's set to search first to last so it returns the first value it finds.


    upload_2021-6-16_1-11-15.png


    If you're playing with zip codes, I'd highly recommend downloading a free trial of Alteryx Designer. It's a geospatial, SQL, data analytics, workflow automation platform that is all point and click drag and drop. It's the future.

    Alteryx zip code tool
    https://help.alteryx.com/current/designer/us-zip9-coder-tool
     
    #184 DriveByBBQ, Jun 16, 2021
    Last edited: Jun 16, 2021
    kinghill likes this.
  35. Where Eagles Dare

    Where Eagles Dare The Specialist Show On Earth
    Donor
    Auburn TigersAtlanta BravesWashington Football TeamAtlanta United

    It can be so much easier
     
  36. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    In a lot of cases it seems like leveraging complex formulas takes more time and effort than using two or three basic formulas for your average user without advanced skills.

    I love me the shit out of some macros, tho.
     
    DriveByBBQ likes this.
  37. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    Yep. Helper columns seem so klunky, but often it's easier for someone else to understand the spreadsheet if they're used.

    For calcs that aren't too involved, I like writing custom functions in VBA and calling them in cells. Can be pretty powerful.

    I have not used it much. I will check it out.
     
    racer likes this.
  38. DriveByBBQ

    DriveByBBQ Well-Known Member
    Donor
    Alabama Crimson TideTiger WoodsBirmingham LegionPGAGrateful DeadUnited States Men's National Soccer Team

    I agree with that. I also think most of that headache could be bypassed by properly organizing the data on the front end and pivoting or w/Power BI but the gen x'ers and boomers can't wrap their minds around the concept of having a data input and deliverable output.
     
    racer likes this.
  39. Handcuffed

    Handcuffed A Succulent Chinese Meal
    Staff Donor
    Seattle MarinersOregon DucksPortland TimbersPortland Trail Blazers

    do you suggest a course to learn VBA?
     
  40. Where Eagles Dare

    Where Eagles Dare The Specialist Show On Earth
    Donor
    Auburn TigersAtlanta BravesWashington Football TeamAtlanta United

    Yes,1997 programing for dummies
     
    Henry Blake and racer like this.
  41. Henry Blake

    Henry Blake No Springsteen is leaving this house!
    Donor

    Not really, and I'm not a VBA expert. I use stackoverflow.com all the time for programming questions. If you have programming experience, you can use that and the hints that the VBA editor gives for the Excel DOM. Also, I'm sure you can find online tutorials for any level of experience.

    One approach I like is to record a macro and take parts of that to piece together what I need. I don't use VBA all the time, so it helps with the syntax for basic stuff that I forget.
     
  42. kinghill

    kinghill Cool American Flavour
    Donor
    Miami HurricanesMiami MarlinsMiami DolphinsMiami HeatPoker

     
  43. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    My work laptop recently lost track of excel as a program or something and deleted all the extensions from the defaults, and it would not stick when I tried fixing it. Finally got that resolved and was good for like a week or two and now .xlsx keeps reverting to Microsoft Excel instead of just Excel for its program, which are apparently different. It’s a little bizarre and really stupid. Getting real sick of saving everything and going to file-open.
     
  44. joe-

    joe- yesterday is a hard word for me
    Donor TMB OG
    Kansas City RoyalsDSA

    change your default program then silly
     
  45. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    God damn it, Joe! I do it twice a day and it forgets!
     
  46. nofatchildren - cissp

    nofatchildren - cissp Free Da Guys
    Donor TMB OG
    Tiger Woods

    Delete Excel
     
    Hatfield likes this.
  47. racer

    racer Yuma, where I work in software.
    Donor
    Iowa HawkeyesKansas City ChiefsLas Vegas Golden KnightsWatfordOlympicsFormula 1

    That would be unhelpful to my daily productivity, but I guess if you say so. Sorry boss.
     
  48. Redav

    Redav One big ocean
    Donor

    We moved to office 360 and excel and outlook have been glitchy as hell ever since
     
  49. Shawn Hunter

    Shawn Hunter Vote Corey Matthews for Congress
    Donor
    Kentucky WildcatsBoston CelticsNew England PatriotsUniversity of LynchburgAEW

    You using the web or desktop app?
     
  50. Name P. Redacted

    Name P. Redacted I have no money and I'm also gay
    Donor
    Kansas State WildcatsSeattle Kraken

    Web versions are cancer
     
    THF, Where Eagles Dare and kinghill like this.