VBA code for performing many searches-and-replaces in an Excel file

I had a long list of search-and-replace tasks that I needed to do on a text file. I wanted an easy-to-use tool, so I put together something in Excel using VBA. The tool starts with a “BEFORE replacing” worksheet and then creates an “AFTER replacing” worksheet. The replacements are performed based on a “Definitions of Replacements” worksheet, which directs the macro to replace everything in the first column with a paired item in the second column.
Continue reading “VBA code for performing many searches-and-replaces in an Excel file”

Javascript for Qualtrics: performing mathematical operations on quantitative responses

In Qualtrics, I needed to take a quantitative survey response, do some mathematical operations to the response, and then (1) display the output to the survey respondent and (2) write the output to the Qualtrics dataset. It turns out this is a little tricky, but as described in this post, Javascript can do this task nicely. Continue reading “Javascript for Qualtrics: performing mathematical operations on quantitative responses”

Javascript for Qualtrics to alter choice options

Here is some Javascript code for altering the current question’s multiple-choice options based on the respondent’s answer to a previous multiple-choice question. Specifically, this code considers the response given to a previous question and modifies the current question to remove any answer options that are lower than the previous response. [Note: I hard-coded the number of options as 10. If there are fewer than 10, it will not throw an error.]

Continue reading “Javascript for Qualtrics to alter choice options”

The CSS I add to a new Qualtrics survey

To my eye, the “page width” used by Qualtrics with most of their themes is too narrow. Even on a small-screen laptop, it leaves a lot of side margin.  The issue isn’t merely aesthetic; a wider screen gives me a little more room for wider labels above closed-ended response options.

I use the following CSS code to give a little more width to the space Qualtrics uses for survey questions. This code is added in Qualtrics “Look & Feel,” under “Style.”

Continue reading “The CSS I add to a new Qualtrics survey”

VBA code for removing all custom animations from a PowerPoint presentation

When I post my PowerPoint slides on my website for my students, I sometimes remove the animations. Animations are nice for controlling when things appear on the screen during the discussion. (Does anyone remember the old technique of covering part of the overhead slide with paper?) However, my purpose in releasing my PowerPoint slides is to give students a record of what we cover in the class discussion, so animations only get in the way for students.

To make it easier for me to create a student version of the slides, I use the following VBA code to delete all the custom PowerPoint animations in a file. Continue reading “VBA code for removing all custom animations from a PowerPoint presentation”