Comment in code: R, SQL, PHP, CSS, HTML, Stata | How to comment and uncomment in code in various software programs and languages, including R, SQL, CSS, PHP, HTML, and Stata. Examples and details on keyboard shortcuts, symbols, and how to comment and uncomment using the code editor Notepad++.
Create a macro in Excel to sum a column | How to create a macro in Excel in 3 easy steps. The macro sums a column of values which can be set dynamically by referring to range using the INDIRECT() function. This method also shows how to use a dynamic formula which reads a value from the cell above the current cell.
Create, format, resize and rename Excel TABLES | Using Tables in Excel has many benefits (we've listed our 10 favourite reasons), and this topic page shows you how to create, format, resize, rename, add totals and summarize data, and use data entry forms with Excel Tables.
Day of the week from date in Excel | How to get the weekday number and day of the week from a date in Excel. Examples with syntax including how to use the WEEKDAY() and TEXT() functions and errors to watch out for.
EVALUATE FORMULA in Excel to find errors | How to find errors in a complex formula, step by step, using Excel's EVALUATE FORMULA function. Where to find the command, method, worked example, and related topics.
Excel BEGINNER tips | If you're new to Microsoft Excel, or to any function software for that matter, there are a few basic approaches to take
Excel IF function | To test IF a value matches a condition, and return one result if TRUE, and another if FALSE.
Excel IFERROR then blank; IFERROR VLOOKUP | Excel's IFERROR function traps errors that could be returned from a formula or calculation, and gives you control over what is returned instead of an error message. Examples with syntax showing IFERROR then blank, IFERROR with VLOOKUP, IFERROR then perform another function.
Excel INDIRECT function | How to use Excel's INDIRECT function to refer to cells using the values entered into another cell. We show the basic method of how it works, and a more advanced example to refer to content in other worksheets.
FORMULATEXT function in Excel – display formulas | It can be useful to inspect a cell's formula visually without having to click in it to display the formula in the formula bar. Excel's FORMULATEXT function enables you to see the formula in another cell.
Keep track of rows in a knitting pattern in Excel | A basic worked example of how to create a row by row tick list for a knitting pattern, to keep track of rows and stitch counts. We use simple commands like copy and paste, flash fill, running total, rotate text and print preview to produce our knitting pattern instruction list.
Lambda functions in Python | In this post we describe the structure of lambda functions in Python, give examples, and discuss the pros and cons of using lambda functions.
LEAFLET map in R Shiny | Code to create a map in R Shiny using Leaflet. This example loads a base map, sets the centre and zoom, and has a reset button to return the map to the original view.
Power Query dynamic file path | Use cell references in an Excel worksheet to create dynamic file paths for Power Query data sources. See how to name cells in Excel, and create custom objects in Power Query.
R Shiny selectInput dependent on another input | How to create an R Shiny selectInput control which is dependent on another select input. Two methods with code examples are shown: creating a reactive output variable, and using Shiny observe and observeEvent functions.
SQL CONCATENATE CONCAT | We show the basic syntax for SQL's concatenate function CONCAT, with examples on how to combine with other SQL functions such as SELECT, DISTINCT, and calculations. Worked example also shows how to create a temporary table.
Transform and plot data in R using plotly | How to transform data between wide and long formats, and plot the data in R using the base plot() function. Steps show how to import data using read.csv, replace the header column, convert wide data to long data, and plot the data.
VLOOKUP MATCH two-way lookup in Excel | How to use Excel's VLOOKUP MATCH functions to find values based on row and column lookups. The MATCH function offers several ways to create dynamic lookups, which can be easily copied across a range of cells in a worksheet.
VLOOKUP with CONCATENATE in Excel | Look up values in a table, using Excel's VLOOKUP with the CONCATENATE function to combine values in multiple cells for the lookup. For example, convert a long format data table to a wide format data table.