Add a Column to a Sheet with Instance Columns from Another Sheet

What this App Does and Why


Purpose/Origin:

The set up is as follows. You have two Google Sheets (Excel Tables, Open Office spreadsheets, &c.). In one are rows of instances (people, order numbers, &c.) with columns of values (ages, dollar values &c.). A second sheet contains category COLUMNS to which each instance from the first sheet is assigned, each assigned to exactly one column. The aim is to produce a column in the first sheet in which the value is the column to which each instance is assigned in the second. A friend asked me how to perform this operation in Google Sheets. I didn't know how but knew how to do this easily in R. This app uses spreadsheets converted to .csv files to do the task in R and produce a downloadable .csv as a result (which can then be opened and manipulated using a wide variety of 'spreadsheet' editors - including Google Sheets). I guess this is a trip around Robin Hood's barn to do something which presumably is simple if you use Google Sheets regularly. Which I, fortunately, do not.

How this Works


Step 1:

Convert each of the sheets to a .csv file and store in an obvious location on your computer. (If the sheets are in Google Docs, use the 'Download As' option to do this.) The first sheet has instances in its first column; the second has each instance assigned to a unique column.


Step 2:

Upload each .csv file from your computer using the two tabs immediately below this one at left.


Step 3:

Use the final tab and 'Add Column' button to create a new .csv file with a final column consisting of assigned column in the second sheet for each instance.


Step 4:

Download this .csv file by using the button at the bottom of the page (scroll down). You can upload it to your Google drive and then open it using Google Sheets and manipulate it as you would any Google Sheet.

Upload/View CSV File with Instances in Column 1

First Data Sheet

Upload/View CSV with Instances in Columns

Second Data Sheet

View/Download CSV with Column Added



Download File