VBA for Excel – Syntax Examples and Samples

When switching between programming languages, it can be a pain to remember the syntax.

To help, here is a “cheat sheet” of syntax for VBA for Excel.

In addition, there are two handy samples of VBA code:

  • Identifying the worksheet’s lowest non-empty ROW (into a variable called “last_row”) and right-most non-empty COLUMN (into a variable called “last_col”)
  • Writing all the values of a worksheet’s column A (each value on a new row) as a text file to the active directory
Continue reading “VBA for Excel – Syntax Examples and Samples”

“Cheat Sheet” of HTML syntax for creating Mechanical Turk HITs

When creating Mechanical Turk HITs, it’s necessary to use HTML syntax. This is a list of 20 examples of HTML syntax (tags and attributes) for accomplishing common tasks in Mechanical Turk HITs. These 20 examples don’t cover the entirety of HTML, but they cover all the HTML that is typically needed to setup a Mechanical Turk HIT.  A single-page version suitable for printing can be downloaded here.

Continue reading ““Cheat Sheet” of HTML syntax for creating Mechanical Turk HITs”

In Qualtrics, using JavaScript with embedded data and survey responses

Qualtrics allows JavaScript in the survey questions.  However, when reading and writing embedded data based on survey responses using JavaScript, the syntax is a little weird.  This post walks through an example of using JavaScript to …
(1) read embedded data (strings and numbers)
(2) accept survey responses, and
(3) change the embedded data based on the survey responses (i.e., conditional processing).
Continue reading “In Qualtrics, using JavaScript with embedded data and survey responses”

Expert Witness Consulting

Although my principal time commitment is to BYU, I engage in some independent consulting as the principal of DeRosia Consulting.

Why do I serve as an expert witness? Part of the mission of BYU’s Marriott School of Business is for faculty to conduct research that helps “solve management problems,” and my work as an expert witness keeps my research topics grounded in the problems that are faced by firms.

Furthermore, I have found that serving as an expert witness enriches my academic research. My cases have influenced my academic research by giving me generalized insights and inspiration. As a result, I have observed a substantial “synergy” between my academic research and my service as an expert witness.

– Eric DeRosia