Skip to content

Instantly share code, notes, and snippets.

@joshgrib
Created March 2, 2016 21:22
Show Gist options
  • Save joshgrib/f0e231ff94fef5dcd70f to your computer and use it in GitHub Desktop.
Save joshgrib/f0e231ff94fef5dcd70f to your computer and use it in GitHub Desktop.
Some excel functions to create reports for the WITC, I got parts online so I wanted to pick them apart to understand, and then make some new ones
//Get list of courses, store is A7:A
=unique( //take the list and remove duplicates
transpose( //flips rows/columns along a TL-->BR diagonal
split( //split up stuff by whatever has a space between it
ArrayFormula( //use forumlas on an array, I think this is like map
concatenate('Student sign-in'!E2:E&" ") //put all the course sign-ins into a list seperated by spaces
),
" "
)
)
)
//Get occurrence of courses, reference A7:A to get names, store in B7:B
=arrayformula(
if(
len(A7:A), //If there is something in the cell, i.e. if there is a course to find the count for
countif(transpose(split(ArrayFormula(concatenate('Student sign-in'!E2:E&" "))," ")),A7:A),
iferror(1/0) //If theres an error
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment