IMPORTRANGE + extra column does not behave as table - google-sheets

I am creating a sheet for our homebrew RPG.
I'm importing a range of data (spell list) in the character sheet, via IMPORTRANGE.
I'm using a True/False checkbox to add the line to a table in another sheet.
=IFERROR(QUERY(DataSorts!$A$3:$Q$1001;"select " &IF($E$15;"C";"B")& " where (A=TRUE)");"")
I want to use the imported datas as a table WITH the checkboxes column, so my players could filter or classify their data. The checkboxes need not to be on the original spell list so any player could have their own selected ones.
I need to Import the data as the original spell list is expanding and I need to update it regularly.
However, if I update my original sheet comporting the speel list, any add or substract of row will break the checkbox usage (because they wont move where the imported data will, thus the spells selected won't stay the same).
How can I link these 2 parameters ?

Use an index to keep the order in the imported data SS, and then perform the combined VLOOKUP+IMPORTRANGE.

Related

How to move a checkbox with a row in google sheets with data sorted using SORT?

I am currently a college student who was trying to make a dynamic google sheet where my data is organized. The premise is as follows:
I input raw data into one spread sheet titled "Raw Data"
That data from raw data is automatically sorted by date using the SORT function to keep it dynamically updated.
If an item in the organized data is checked, then the row turns gray and updates into a corresponding chart.
My problem is that as I add or edit data, the checkbox is stuck to the row. In the first picture, you see the normal data as is.
organized spreadsheet data using a SORT function
However, lets say I add a due date for an assignment on 1/31/23. Then this happens.
Spreadsheet data following SORT function modified to show problem
So overall, my question is how can I lock a checkbox to a specific row so if the row is moved, the checkbox moves with it? If it is needed, I have a public link to the spreadsheet if it helps understand the problem:
Public Spreadsheet 1/31 for Clarification
I currently tried several data validation rules but most of them simply locked the cell from being edited if it was checked.
I also tried modifying the RAW data and adding a checkbox there before the sort function refreshes but that negates the point of the sheet at all then.
I was not sure how else to go about it trying to lock it into that place. Also, I was not sure how to upload as a MARKDOWN text table so I figured an image would suffice for the problem.

How to get sum/difference From a different sheet using dates as reference?

Collections Sheet
Expenses Sheet
Hi, I would like to get the daily sum/difference of the expenses from the expenses sheet then output to collections sheet using dates as reference/identifier.
I tried this code =MINUS(C8,INDEX(Expenses!20:31,12,2)) but I want it to auto compute when I drag the box. sorry for bad english. thank you
Desired output:
Desired Output
Output at (Net) Cash On Hand Row / Reference Date Column, the output should be August 1 Collection - August 1 Expenses.
The main issue is with the structure of your expense sheet, since you need to use only every second column. For this you can use various methods, something like
=split(substitute(join(";",Expenses!A2:DJ2),"Total:;",""),";")
The join function takes the whole row and joins it into one string, the substitute function removes the Total: from it, along with the trailing ; and the split function separates it again to separate values. This will be an array, automatically spread out to 31(-ish) columns width if entered into a cell like C10 on your Collections sheet.
Then you have two options, simply do =C8-C10 in C9, which you can drag with no problem. You can also hide the row 10 by making the text color white, or even integrate it in that sheet.
My recommendation however is not to do any of that, instead enter the formula
=arrayformula(C8:AG8 - split(substitute(join(";",Expenses!A2:DJ2),"Total:;",""),";")
into C9 on the Collections sheet and it's taken care of, without the need to drag it out. You might need to tweak it, not sure if the AG8 and DJ2 are the correct columns to end them on (should be the last column if every column or every 2 columns is a day). The arrayformula makes sure that the subtractions are done automatically for each pair of values, and expanded automatically into the row. Make sure that there are no values or formulas in D9:AG9, so it can fill up the values automatically and you don't get a #REF error.

Google Forms changes cell reference on different sheet in Google Sheets

I'm building a spreadsheet to track my macronutrients and calories. I made a google form for inputting information and it populates a "responses" sheet on google sheets. I made a different sheet within the same spreadsheet to perform all the calculation and generate graphs.
But every time I enter a new response into the form, it creates a new row and changes all the cell references in the calculations sheet. For example, I reference cell A2 from the responses
='Form Responses'!A2
and when I actually fill out the form and it populates, A2 in the responses sheet is filled in but the reference in my calculations sheet has been changed to A3.
='Form Responses'!A3
I tried using $ but it did the same thing, automatically changes the cell that I referenced.
Any way to have my calcuations sheet reference the newly created rows automatically?
In a new tab use for example, = {'Form Responses'! A: Z} and use this data to do your calculations and you will have no problems!
Solution
To avoid the row value to change reference when adding a new response, you will need to add the $ next to the number instead of next to the column value (A):
='Form Responses'!A$2
Moreover, an easy way to reference your whole column is to reference a range instead such as:
='Form Responses'!A:A
And then just drag it through your column. If you want it to be more specific (select the range you want):
='Form Responses'!A2:A999
I hope this has helped you. Let me know if you need anything else or if you did not understood something. :)

Display columns of information in Google Sheets based on Drop down selection

What I am looking to do is have a list of items in a dropdown list in cell A1. Lets say the list is "Presidents, Movie Stars, Rappers".
When I select Presidents I want Column B in Sheet 1 to list all the presidents with column C listing their party they represented and column D to list their years in office. When I select Movie stars I want column B to List various Movie Star names, Column C to list number of movies starred in and Column D to display their highest paid film.
So in short I want 1 dropdown to populate 3 columns worth of data.
Everything I have looked up uses scripts(which I think this is completely doable without using) uses VLOOKUP but has 1 cell worth of data appear(ex, A1 dropdown displays data in A2 but not data in B1:B50, C1:C50, and D1:D50) or doesnt worth with multiple columns of data. I am fine if the data pulls from another sheet I just think there is a better way to do this then filling in 200+ cells with an if:then function based on my selection in cell A1. Anyone know an easy way to do this?
An elegant solution, in my opinion, is to do something like the following:
Create a column (which you can later hide) that has all value combinations, with a delimiter between the values. For example, you could have "Presidents>Barack Obama>Democrat>2008-2016"
Then create a simple function (no VLOOKUP needed!) to pull the individual values by using FIND to findn the location of the delimiters and split the combination.

Add new rows when new value exists

I have a dataset I'm importing into my spreadsheet (using ImportRange). I'm wanting to count the amount of each data value imported. So say I have a column of numbers (1 and 2), I'm wanting to count each one. But the dataset is expanding with each user input, so if someone puts a 3, I've been having to add a new row and copy my equation into that so it can handle the new value.
How can I change this so that if a new value is passed in, the spreadsheet will automatically add a new row for that value and update the values?
I'd also like it to be in numerical order if at all possible. I'm using numbers 1-999 and it's difficult to keep track of if it's not in order.
Suppose your data imported is in column A. Then in column B beneath your headers place =sort(unique(A:A)). That will give your sorted list of values. For me the first value was in B3. So next to that I placed =countIF(A:A,B3). That can be dragged down as far as you anticipate you could have values (in your case no more that 1000 rows give or take). That will show 0's beyond the end. If you want to suppress them, wrap it in =IF(countIF(A:A,B3)=0,"",countIF(A:A,B3)) and drag that down instead.

Resources