Alphabetize rows without losing data - google-sheets

My sheet contains volunteer data imported via query from another worksheet. I'm assigning various roles to each volunteer on this sheet.
I'd like to alphabetize by last name to make it easier to locate names. But I need to be able to add names to the "Roster" while keeping the assignments with the correct names.
In my current setup, when I alphabetize, inserting a new name causes misalignment of assignments. Any ideas how I can avoid this?
Here's a test sheet to demo the process. The actual sheet contains dozens of volunteers and multiple data columns for each volunteer.
https://docs.google.com/spreadsheets/d/1KqXRYda9Z0dGJfEACfPMAAtdN1re02-1H0Bmrn9aF58/edit#gid=0
Thanks in advance

Related

How do I return missing data when comparing two columns?

I've read a few similar questions, and I can't seem to find exactly what I'm trying to do.
I have a roster of employees in sheet "Roster" with their names in Column A. In sheet "Hours" I have a list of assigned jobs for tomorrow, with the assigned employee's name also in Column A. I'm trying to add a column of employees from the roster that are NOT in the list of employees on jobs.
The closest I've gotten is with this, on the Hours sheet:
=ARRAYFORMULA(VLOOKUP('Roster'!A2:A, A2:A,1,0))
which gives me a list of the entire roster, with the missing ones returning an #N/A error that tells me the missing name when I mouse over it and read the error code. Is there a way to just get a list of the errors? Would I be better off attacking this from a completely different angle?
EDIT: Sanitized example pictures. If what I was trying to do worked, it would return Bob and Jim in this example.
Assuming you're trying to return this list in the "Hours" sheet, you can build off what you had. Try this:
=ARRAYFORMULA(FILTER(A2:A,ISERROR(VLOOKUP('Roster'!A2:A, A2:A,1,0))))
Keep in mind that this formula was written sight-unseen. If it doesn't work as expected, consider sharing a link to a copy of your sheet (or to a sample sheet set up the same way and with enough sanitized but realistic data to illustrate the problem, along with the manually entered result you want in the range where you want it).
I ended up going a completely different route. I made a third "Under the Hood" sheet, pulled the two columns into it with queries, ran a match formula down the list and returned "" on errors, then ran a query on Hours to get the names where it had null for the match list.

When using QUERY, how can I make it so that data moves together when using filter?

I am creating a tool for a video game I play.
Link to the example spreadsheet (Please make a copy to edit so that this copy stays intact for additional helpers).
Sheet 1 is “Choose Owned”. It contains a list of all of the champions available in the game and includes their attributes.
Column A contains checkboxes. Checking a checkbox indicates that the user owns that champion, and brings it to Sheet 2.
Sheet 2 is called “Owned”. It contains a list of the champions checked off in “Choose Owned” (aka the champions the user owns). “Owned” includes the champion attributes too, as first seen in “Choose Owned”.
Beyond those same attributes, “Owned” contains 8 additional columns.
These columns are from Columns G:N and are labeled ‘Level’, ‘Rank’,
‘Ascension Lvl’, and ‘Team Label(s)’ (‘Team Label(s)’ takes up
columns J:N). This data is all unique information and requires the
user to input the information themselves depending on their
champions.
Because there are so many champions, I want the user to be able to use the Filter function in “Owned” so they can easily locate the champion they need or sort the table however they wish.
However, because I use the QUERY function to get the data from “Choose Owned”, the Filter function tends to break. The most obvious error comes when you try to sort A-Z or Z-A; this simply cannot be done. I was fine with this, and have even included a note at the top telling the user to avoid sorting alphabetically.
Everything else works correctly until the user tries to add a new champion from “Choose Owned”. When the champion is added to “Owned”, the additional, unique data in columns G:N go out of order because they don’t move with their original champions.
Example:
I choose my champions. These champions are copied to “Owned”.
I pick their relative data in columns G:N.
A few days later, I obtain new champions and check them off in “Choose Owned” so they are added to “Owned”. However, when I do this, the champions stay in the same order as they are in “Choose Owned”, and columns G:N do not move with their champions so now, that information is with the wrong champion.
I want the additional data (G:N) to move with their champions when the table is edited due to champions being added. Or, in other words, I want those columns to stay linked to the first columns.
If there is a different way to achieve all of this like if I have to use a function other than QUERY, that is fine!
Please share any solutions you may have. I would prefer to not use a script but will consider the idea if it works.
this is a common issue within Google Sheets and it's solvable in 2 ways:
either by introducing a common value (unique ID) and then linking the manual input to query and aligning it by ID
or easier approach in your case - using timestamp/linear ID so every new entry would be added to the bottom and then the query would be sorted based on this order.

Combine multi-row source data across separate tabs into one summary tab without using hard references to individual sheet names [duplicate]

This question already has answers here:
How to create INDIRECT array string of multiple sheet references in Google Sheets?
(2 answers)
Closed 2 years ago.
I would like to create a summary sheet that reports the same data from across multiple tabs and doesn't rely on referencing individual sheet names in the formula/code. I have successfully done this when there is only one line of data representing each tab (using getSheetnames or Index scripts).
But, the data I want to summarize has multiple rows from each tab that need to be reported on a summary sheet.
I've successfully managed to combine and report the data from separate sheets into the Summary using a query/array combo where the query range includes each sheet and separated with ";". This can be done using cell references to the Sheetname list as well.
However, this needs to be more dynamic as sheets will be added/removed regularly and I would like to not have to re-write the query every time to add/remove individual sheet names.
SUMIF also works, but with similar limitations.
I believe my main challenge is using a list of sheet names which I can generate (listing one sheet per row) and associating those names formula/code that will produce summary results in multiple rows.
If Sheet names are in Column A, the following formula displays data combined from multiple tabs
=ArrayFormula(query({INDIRECT(A3&"!A2:A200"),to_text(INDIRECT(A3&"!B2:B200")),INDIRECT(A3&"!C2:C200");INDIRECT(A4&"!A2:A200"),to_text(INDIRECT(A4&"!B2:B200")),INDIRECT(A4&"!C2:C200")},"select Col1,Col2,Col3 where Col1 contains 'Project'"))
BUT, I want to reference my Sheetnames list without having to write in actual sheetnames or cell references to the formula.
Here's a link to a dummy workbook with sample.
I realize I'm late to the party on this question, but have you considered a Google Form with 5 questions:
Project?
Phase?
Transaction?
Start?
End?
That way, all your data would be in a single tab. People could input using the form, and you could still have project by project outputs for viewing/analysis using a simple query.
Google Sheets was designed from the ground up to be different from excel in specifically this way. There are all sorts of incentives to condense your data SOURCES while making it easy to disaggregate your ANALYSIS. While Excel is exactly the opposite. It's easy to keep track of things on tons of different tabs, and aggregate it all in one place. Yet there is no such thing as FILTER() or QUERY() to do the opposite.

Link columns so data updates are properly reflected

I have a column with data values and I want to link it to other columns in the same and different sheets but in the same spreadsheet. This is, having the same data in different columns in a spreadsheet while keeping all linked so updates on the source one would affect all of them.
I've tried with:
=SheetName!ColumnIndex:ColumnIndex
(e.g. =Sheet1!A:A) but, although it works, it is a cell reference not a column reference.
What is the best way to achieve it?
Maybe what you want is just the array version of what you have already tried:
=arrayformula(Sheet1!A:A)
(If not, please clarify!)

How do I use Macros to copy select data from one worksheet to another on Excel?

I need to create a Macro on Excel to keep track of changing contracts. There's already an existing macro that updates the contract data so I need to create another macro...
There are two worksheets. On the first worksheet is a bunch of data with each row representing one contract. There are several categories (Contract #, Date, Price, etc.).
I need to write a Macro that finds only certain contracts fitting specific criteria (like, contacts at a specific date or a certain price), copies and pastes them into the second worksheet.
What I've done so far:
I've figured out a bit of a convoluted way of doing it using IF and OR functions. So using OR I specify the criteria and IF to basically find the corresponding data if things are TRUE.
When things are false, a 0 is entered. The problem is I have tons of rows of zeroes---rows/contracts that didn't fit the criteria. When I try to use the find command (CTRL+F) to find, highlight, and properly delete (with rows shifted up) all the zeroes, Macro doesn't record it and I'm not sure how to write it in the code.
Any insight would help!
Just change your formula to:
=IF(OR(TermSheet!$E40=41220,TermSheet!$M40="bpxx"),TermSheet!E40,"")

Resources