Category: Blog

  • Building a Versatile Variables Container in Excel

    Building a Versatile Variables Container in Excel

    Microsoft 365 (and specifically Microsoft Excel) is my favourite tool when it comes to work, and also really fun to play with in my spare time as a ‘hobby’ that also helps me improve my skills.

    I’ve used probably dozens of different methods of storing ‘sets’ of variables for the tools and mini programs I’ve created in Excel over the years, some very rudimentary, and others more involved but also difficult to maintain or fragile in various ways.

    However, recently while playing around with Power Query and Excel formulas (yes, I do this when I let my mind wander), I came across an idea for a robust variables container stored in an Excel table that can be accessed in several different ways throughout a given tool. You can access or refer to these variables using good old Excel functions (with a LAMBDA, or a UDF if you’re old school), with a simple Power Query function call, or a few lines of VBA in your editor (see the UDF), depending on the needs of your project.

    Getting Started

    Let’s go through the basics of the project’s needs first:

    First, create a basic table called Variables with a set of Name-Value pairs.

    This table will contain all the variables we want to reuse across different places in the tool or want to be user-configurable later on.

    1. The LAMBDA function

    First, we can create the LAMBDA function (if you use Excel 365, which I highly recommend!), by putting the following function in the Name Manager (I used the name getVariable for these functions, and variableName for the name of the variable):

    =LAMBDA(variableName, XLOOKUP(variableName, Variables[Name], Variables[Value], "No matching variable.", 0))

    Using this function elsewhere in the workbook, we get, just like we want:

    2. The Power Query function

    Next up, we will create a Power Query function to be able to refer to a variable from this table and get back the value for it.

    Launching the Power Query Editor (from the Data tab), I will create a function called getVariable (again), and include the following:

    (variableName) =>
    let
        Source = Excel.CurrentWorkbook(){[Name="Variables"]}[Content],
        #"Transposed Table" = Table.Transpose(Source),
        #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
        Result = Record.Field(#"Promoted Headers"{0}, variableName)
    in
        Result

    Note that I’m still using variableName for the variable here, and this allows you to invoke the function and get the expected result back if we want to refer to this variable in another function:

    3. The VBA function

    Finally, we can create a quick function in VBA that allows you to use these same variables across your project, making it fast and easy to maintain your code however you have it set up.

    Open the VBA editor, and in a new (or existing) module, I’ll write the getVariable (again!) function:

    Function getVariable(variableName As String)
    
    Dim VariablesTable As ListObject
    
    Set VariablesTable = Main.ListObjects("Variables")
    
    getVariable = WorksheetFunction.XLookup(variableName, VariablesTable.ListColumns(1).DataBodyRange,  VariablesTable.ListColumns(2).DataBodyRange, "No matching variable.", 0)
    
    End Function

    With this function, you can easily get any variable from your table anytime you need it, and you’ll be able to change the parameters in your code without digging in to the developer tools.

    Well, that’s it. With this simple, basic Excel table and three short code snippets, you’re ready to tackle nearly any Excel project imaginable while keeping your data in check and making sure you don’t leave hard-coded values anywhere in your Excel tools.

  • Wow, Flying a Kite is More Fun Than I Remember!

    Wow, Flying a Kite is More Fun Than I Remember!

    Today is the end of the 3rd week of my 5 weeks of parental leave from work. We’ve done lots of fun things as a family, but honestly today was one of the highlights so far! I can’t remember the last time I flew a kite but I’m sure it’s been literal decades.

    The feeling of getting the kite up in the air and keeping it there is very satisfying, and then being able to hand it off to your daughter and have her take control is a Big Dad moment. 10/10 would recommend.

  • You should be able to use TMs during Pokemon Go Community Days

    I have never posted about Pokemon Go on here before, and it’s possible once I start, I’ll just never stop.

    However, what happened this morning hits in just the right way to scratch all my itches, and that’s what this website is about. I posted the following on Reddit last night, and for reasons I don’t fully understand, it was removed this morning by the mods.

    This is part of a bigger thing I always think about, where I don’t understand how the cultural nuances of Reddit got to where they are. So rather than complain about cancel culture or how I’m being attacked in an echo chamber, I’m just going to re-express my point here. Free speech!

    If you don’t care about Pokemon Go, by all means you don’t have to keep reading.

    I realize Niantic wants to sell elite TMs, which is why they haven’t put anything like this in motion, but with PvP now being a big priority, you can officially buy access to moves like icy wind on dewgong, or psystrike on Mewtwo.

    With CD move TM windows, none of those uses change. Especially with something like a magikarp community day, where up until March nobody could have thought we would ever see this, people have great maxed out, powered up, best friend pokemon. These now either get replaced by new pokemon with a CD move, or people have to spend valuable elite TMs on something easily ‘replaceable’ to get extremely meta relevant moves.

    For example, I have a 100% Gyarados that’s currently maxed out as of S1 of GBL, but it’s now much less valuable than my 93% Aqua Tail Gyarados from today for PvP, unless I use my one and only elite TM (and because I only get one of these per season of GBL, I’m realistically effectively never using it).

    Even if using a TM during this window required candy and/or stardust (somehow) it would still let the pokemon we already have be usable down the road (like what happens every December so far).

    All of this to say, in an effort to increase fairness, especially in GBL, I don’t think it really takes anything away from the game (at this point) to let people use CD evolution windows to also TM those moves.

    r/TheSilphRoad Post
  • COVID Alert is now publicly available! [Links]

    You can download the COVID Alert exposure notification app in Canada now! It’s available on the iOS App Store as well as the Google Play Store.

    See more details of how it works and what it looks like in my older post when I started using the beta:

  • Here’s What Canada’s ‘COVID Alert’ app (beta) Looks Like

    Here’s What Canada’s ‘COVID Alert’ app (beta) Looks Like

    [UPDATE – July 31]: The app is now publicly available. Go get it!

    On Wednesday, Health Canada finally released a beta (test) version of the Canadian ‘COVID Alert’ exposure notification app.

    I have been waiting for a couple of months to finally be able to get this set up once Apple and Google announced they would be building exposure notifications in to their operating systems, and it’s finally here (if you are willing to jump through some hoops and help test it out).

    Let’s take a look!

    When you first launch the app, you’re given a bunch of info right off the top. You’ll also have to accept exchanging exposure tokens with other phones, as well as receipt of exposure notifications, and then standard iOS app notifications as well. Here’s what the setup screens look like:

    Once you’ve got everything activated, there’s not a whole lot to do besides look at the menus and edit your information.

    I was informed via email they will be testing what an ‘exposure’ looks like in the app over the next 2-4 days, so if that happens, I will definitely share that information!

    There’s not much to the app to be honest (which is a good thing), but there is a little more information to go over.

    In the meantime, here’s some information provided under ‘How it works’:

    These exposure notification apps (one per country, by rule) are meant to be for public health reasons only, so they’re very minimal, and outside of use in conjunction with your doctor, you won’t really notice it on your phone.

    The only information the app collects and is able to use is a set of randomly generated ‘codes’ from the phones of others you interact with, and your phone sends out a similar set of ‘codes’ to people around you. No private information is stored or sent anywhere, like location or your personal details.

    If you test positive, your doctor will give you a one-time use code which you enter in to the app, and this (if you choose to do it) will notify anybody else who has the app that you were nearby them and may have exposed them to the virus, because their phone has stored your ‘code’ from while you were near each other.

    It’s a pretty incredible, secure system, and I’m really eager to have it see wide use in Canada and around the world, on Android and on iOS, over the coming months and possibly years.

    When I hear more about the public release, I will post updates here!

  • 3 Things: WFH Edition

    Obviously, I would pick:

    • Fast internet
    • Multiple monitors
    • Good chair
  • Happy 2nd Birthday Evie! 🥳🎉🎂

    Happy 2nd Birthday Evie! 🥳🎉🎂

    Today is Evie’s 2nd birthday. In case there were any doubts she’s my daughter, check out this picture!

    We had such a good time celebrating her birthday today (and getting out on the bike), and Julia made a delicious pink cake that was so good!

  • Features I’m looking for in an instant messaging client

    I’ve spent far too much time lately trying to convince people that giving new things a shot is a worthwhile endeavour, especially when it comes to instant messaging apps.

    Recently, I was led down the path of discovering Skype again, and then ended up tangentially researching pros and cons of that and other messaging services. Now, what I really want from an instant messaging app has become crystal clear.

    Below is a list of all the things I’m looking for in an instant messaging service in 2020. Obviously, these involve a set of tradeoffs, but based on my personal priorities, this is where I’m at.

    Key Features

    • Cross-platform applications (web, mobile [iOS, Android], Windows, Mac, I guess Linux if you really want to be serious)
    • In addition to the above, something that is really nice about good applications is that they respect the conventions of the platform(s) they’re on, including design conventions like dark mode and fonts/window design
    • Email and username login (with optional two-factor authentication)
    • Full message history, with option to export
    • Company/service doesn’t make its money primarily from advertising
    • Text, picture, video, audio/video calls with multiple people, GIFs, other nice well thought out features are a nice bonus
    • Ability to share conversations via link for new people to join
    • Conversations between different groups of people with overlap should be easy and handled gracefully, including showing enough information in notifications

    At the moment, the app I have found that matches all of these the best is, like I said last week, Skype! I was as surprised as you, but I’m planning on sharing this info with as many people as I can to see if we can make Skype a thing again.1Find me on Skype today!

  • Skype is Good Again

    This post is all about how I came to start using Skype early in 2020 after more than 10 years away. We’re going to get to the reasons why, but first, I think it’s important to go back and figure out how we got here. If you don’t need convincing, you can catch up with me on Skype right now!

    First, let’s go back in time

    I think a lot about communicating with others, especially when it comes to using technology, and the pros and cons of the rapid pace of change in how we can stay in touch with another.

    When I first started using cloud instant messaging and video chat, Skype was pretty much the only game in town. It turns out, a lot of people who experienced the early internet also got accounts on Skype, even though the odds are very good that they don’t use the account(s) anymore. In addition, the service has gone through so many transitions and consolidations that most people probably don’t remember their account credentials or have access to their 15 year old email accounts anymore.

    To give some context for my rediscovery of Skype, we have to go back a ways. Early in 2019, I made the decision to delete my Facebook account. The company has simply had too many privacy disasters and I wasn’t particularly interested in the ‘pros’ of using the Facebook service. Basically the only reason I wanted to still have a Facebook account was to use Facebook Messenger, because for my group of friends, it’s very much the ‘default’ messaging service.

    Deactivating Facebook (the social network)

    Sometime in the last few years, Facebook made it possible to use Messenger while having the social networking part of your account deactivated. At that point, I untangled the complex pieces of my Facebook account from the other parts of my life, including my websites, Facebook Pages (moved administration of those to the equivalent of a shell account), all my ‘Sign in with Facebook’s, and anything else that I didn’t want to take down completely when I deleted the account.

    With that done, and after exporting 5 GB of data from Facebook, I deactivated my account. I spent almost all of 2019 without a Facebook account, and in the end, I found only one thing to ‘miss’ about Facebook. This was the fact that people who host events use Facebook as their canonical invite pool, and therefore invite only people on Facebook. This is in spite of the fact that Facebook makes it *REALLY* easy to invite people to events via email, and even let them RSVP. Very weird that people let that filter bubble control the social circles of their events (it turns out that you basically don’t exist if you don’t have an account), but who am I to judge.

    One of the reasons I wanted to make this set of changes to my internet social life is that Facebook has a terrible record on privacy, and so in parallel to making these changes, I was doing a lot of work to try to find and convince my friends to use a more secure messaging service, preferably one not owned by an advertising company. I went through lots of different options, including apps that were TOO focused on privacy like Signal. I explored open source options hosted on a server of my own like Mattermost, which is a really great application which is super cheap to run and lets teams of all sizes chat.

    Starting to move away from Facebook (the company)

    In the end, having explored what I thought were all the options, my friends and I landed on an app called Wire. It’s respected in the industry for being secure, in that you can create a cryptographic link with somebody in person so you can have complete confidence you’re chatting with somebody who is who they say they are. I don’t get that intense about security, but it’s good to know the option is out there.

    Now, we can fast forward to the beginning of this year, 2020, and the day I decided I needed to get rid of all ties to Facebook1Side note here, I also deactivated Instagram as part of this, because even though I hadn’t really used the service at all in about that same one-year period, having the account still helps the company (Facebook), and I saw no reason to do that. Once again, I downloaded an export of all my photos, and I was gone., because it’s a company that just doesn’t deserve more chances. Basically the last set of people who I was chatting with on Messenger is my immediate family, and I knew they would have no interest in going to Wire, and frankly it’s not a great looking app and I wanted to try again to see if I could find something better. The other point here is that since I wanted to video chat with my family, I needed solid video and Wire didn’t have that for groups.

    If I wanted to move away from Messenger, I would need to find something that would replace the functionality that I wanted with my parents and family.

    Finding Skype (again)

    It’s at this point that Skype comes back in to the picture, and where things get most interesting, from my perspective. Having spent about 15 years learning everything I can about technology and multiple apps platforms, I know good software when I see it. There was a good long time when Skype was NOT a good app, but honestly that time is behind us.

    The app is owned by Microsoft, it’s not run by an advertising company, it runs on every platform known to man (including the web), it’s updated frequently, and with a very consistent and complete set of features on all platforms, and it keeps up with the trends and new features of the platforms it’s on, like dark mode. There is a reason TV stations often use Skype for interviews, and it’s because it’s rock solid and you can easily set it up as a base to stream live video.

    For all the reasons listed above, and so many more, I thought it was worth giving Skype another shot. Honestly, I’ve added the app to my phone and computer now, and it just keeps impressing me. The biggest problem the service has in my view so far is that a lot of people don’t remember the credentials for their old accounts and so they end up needing to make a brand new account to use it again, and honestly that only bothers me and other nerds who care about data and account consistency.

    My family used Skype for our first family video call on it this past weekend, and it was honestly excellent. It might be unmatched when it comes to features used for actual human interaction, and the video and sound quality was unbelievable.

    Yes, you should try Skype

    Honestly, my next step here, and my main purpose for writing this ridiculously long piece, is to tell you that I think you should be using Skype, potentially more than any other chat/video platform out there. Depending on the operating systems you and your friends use, this is almost always a very good choice.

    So yes, I think you should try Skype, or give it another try if you haven’t recently, because while I had written the once great app off a long time ago, it is BACK, and definitely better than ever!

    You can find me on Skype using the username rob.attrell, or by following this link. Hope to see you there!

  • Merry Christmas 2019!

    Merry Christmas 2019!

    I hope you’ve had a really great year! Our family has had its ups and downs over 2019, but we’ve come through it with some big changes and a positive outlook on the year(s) to come!

    Evie celebrated her first birthday back in April, and she continues to surprise us every day with new words and strong opinions she shows off.

    We moved in to a new house (our home) in June, and couldn’t be happier with where we end our days! There’s still some big and small projects we’re planning to make the place just perfect, but overall we’re just excited our months of following real estate paid off (and that it’s over).

    I’d like to wish all of you reading this a merry Christmas, a happy and healthy holiday season, and a fabulous new year! Thanks for being a part of my life!