Excel – 3 super cool tips to improve you productivity in Microsoft Excel

Excel is a powerful tool that is used by millions of people all around the world. Despite its popularity, many people still use Excel only for basic calculations and data entry. In this article, we will show you three cool Excel tricks that will help you take your spreadsheet skills to the next level.

Freeze panes

Do you ever find yourself scrolling down a large spreadsheet and forgetting which column represents which data? If so, the Freeze Panes feature in Excel can be your best friend. This feature allows you to freeze certain rows or columns in place while you scroll through the rest of the spreadsheet. To do this, simply select the row or column that you want to freeze, go to the View tab, and click Freeze Panes. This will keep the selected row or column in view no matter how far you scroll.

AutoSum

If you are working with a large dataset and need to quickly add up a column or row of numbers, the AutoSum feature can save you a lot of time. Simply select the cell where you want the sum to appear, click the AutoSum button, and Excel will automatically add up all the numbers in the selected column or row. You can also use this feature to find the average, count, and other basic calculations.

Conditional formatting

If you want to make your spreadsheet more visually appealing and easier to read, Conditional Formatting can help. This feature allows you to format cells based on certain criteria. For example, you can highlight all the cells in a column that contain a certain value, or all the cells that are above or below a certain number. To use this feature, simply select the cells that you want to format, go to the Home tab, and click Conditional Formatting. From there, you can choose from a variety of formatting options to make your data stand out.

In conclusion, Excel is a powerful tool that can do much more than basic calculations and data entry. By using these three cool Excel tricks, you can save time, make your spreadsheets more visually appealing, and take your spreadsheet skills to the next level.

Selenium – How to update ChromeDriver using VBA

The macro below updates the local ChromeDriver to the most recent version using VBA:

    Sub DownloadChromeDriver()
        Dim url As String
        Dim fileName As String
        Dim req As Object
        Dim stream As Object
        
        ' Set the URL and file name for the latest ChromeDriver
        url = "https://chromedriver.storage.googleapis.com/LATEST_RELEASE"
        fileName = "chromedriver.zip"
        
        ' Make an HTTP request to get the latest ChromeDriver version number
        Set req = CreateObject("MSXML2.XMLHTTP")
        req.Open "GET", url, False
        req.Send
        
        ' Get the latest ChromeDriver version number from the response
        Dim latestVersion As String
        latestVersion = req.responseText
        
        ' Construct the URL for the ChromeDriver binary based on the version number
        url = "https://chromedriver.storage.googleapis.com/" & latestVersion & "/chromedriver_win32.zip"
        
        ' Make an HTTP request to download the ChromeDriver binary
        req.Open "GET", url, False
        req.Send
        
        ' Save the downloaded binary to disk
        Set stream = CreateObject("ADODB.Stream")
        stream.Type = 1 ' Binary
        stream.Open
        stream.Write req.responseBody
        stream.SaveToFile fileName, 2 ' Overwrite existing file
        stream.Close
        
        ' Extract the downloaded binary to a known location on your computer
        Dim zipFilePath As String
        zipFilePath = ActiveWorkbook.Path & "\" & fileName
        Dim extractPath As String
        extractPath = Environ("userprofile") & "\AppData\Local\SeleniumBasic"
        
        Set objShell = CreateObject("Shell.Application")
        Set objSource = objShell.NameSpace(zipFilePath).Items()
        Set objTarget = objShell.NameSpace(extractPath)
        
        objTarget.CopyHere objSource, 16
        
        
        MsgBox "ChromeDriver version " & latestVersion & " installed successfully."
    End Sub

The video below breaks it down:

SeleniumBasic – Automation error

The problem

Imagine the following scenario: You develop the project for your client using Selenium VBA as a library, everything works perfectly, in all browsers, drivers, etc. All tests pass wonderfully.

Then you send the file along with all installation instructions. But when the client runs your file, the following error is displayed:

The solution

Install .NET Framework 3.5 on the computer. You can download it here:

https://docs.microsoft.com/en-us/dotnet/framework/install/dotnet-35-windows-10

After it’s installed, run the application again.

The explanation

Although it runs in the context of VBA, which is a native Windows application, SeleniumBasic is developed under .NET Framework, specifically version 3.5, which makes its execution dependent on it.

It’s no use having only .NET Framework 2.0 or 4.0. They are independent and need to be installed separately.

Tecnologia e Programação