If-Statement in Google Sheets - if-statement

I have a Google Sheet, linked below, with a column for student names and then columns for all subjects with the student marks beneath them.
The students do not all do the same subjects though.
What I would like to do is to capture the subjects and marks which each student does in the same sheet.
So that I had Student name, then Subject 1, subject 2, subject 3 etc. I only want to know the subjects that the student takes. I have created the columns for this information in cells X to AR in my sheet.
I have no idea how to do this. Please help, please...
https://docs.google.com/spreadsheets/d/1WfmUEcvFMiw-R_TMrh30jG8gLhCDT-h-dz_PP_sNn4Q/edit?usp=sharing

=ARRAYFORMULA(SPLIT(REGEXREPLACE(TRANSPOSE(QUERY(TRANSPOSE(
ARRAYFORMULA(IF(E3:W8<>"", $E$1:$W$1, ))&","), , 40000)), " ,", ""),","))

If you are okay with it being a list in a single cell you can use the following logic:
=IF(E3<>0,E$1 & ʺ, ʺ,ʺʺ) & IF(F3<>0,F$1 & ʺ, ʺ,ʺʺ) & ʺ...etcʺ
Just add to it with G,H,etc following the same pattern.
If you want to fill in the table on the back end of your calculation it will take more work.

Related

How can you add more sheet tabs to existing IF/SumIF Google Sheet formula?

I'm trying to use Google's monthly budget template and alter it so I can get a full view of the year. I have tabs Jan-Dec made but I can't figure out how to add them to the below formula. When I try, it tells me that the IF can only use 3. The areas Expenses and Income in the screenshot should total up the Amounts (column C) with their respective category (Column E).
The same would be said for income using Columns H and J.
=if(isblank($B36), "", sumif(January!$E:$E,$B36,January!$C:$C))
Here is the link to my sheet https://docs.google.com/spreadsheets/d/1MTL3xdN-0W4vS7e_yO1C4qkFAxlsxhx3SLXyml78qOc/edit?usp=sharing
delete E28:E41 and try in E28:
=BYROW(B28:B41, LAMBDA(b, IF(b="",,
IFERROR(QUERY({January!C:E; February!C:E; March!C:E;
April!C:E; May!C:E; June!C:E; July!C:E; August!C:E;
September!C:E; October!C:E; November!C:E; December!C:E},
"select sum(Col1) where Col3 = '"&b&"' label sum(Col1)''", ), 0))))
Update:
In order to make it cover the whole range of Categories with the same principle of having the flexibility of a list of Sheets' Names, you can use this formula:
=INDEX(IF(ISBLANK(B28:B41),"",REDUCE(,A28:A,LAMBDA(a,sh,
a+SUMIF(INDIRECT(sh&"!$E:$E"),B28:B41,INDIRECT(sh&"!$C:$C"))))))
I've set it in your sheet too in a new column to the right
If you stablish a list of sheets' names in a range, you can use this formula:
=if(isblank($B36),"",REDUCE(,A2:A,LAMBDA(a,sh,
a+SUMIF(INDIRECT(sh&"!$E:$E"),$B36,INDIRECT(sh&"!$C:$C")))))

Trying to replace data based on attributes from two other columns

I need to change the inventory category for a couple of account numbers and only for a couple of companies. The inventory category for these accounts are mapped based on the account number but need to be changed specifically just for two companies. I've tried to filter by the company number and then find/replace, which worked fine, but then I can't unfilter to bring back the rest of the companies. I can't change the category for just those account numbers because it is only different for just those two companies.
Lisa, Here's perhaps a simpler approach than where your current way is taking you.
If I begin with this table:
Then I add a column (Add Column -> Custom Column) with the following:
The formula uses an if statement to determine whether each row has a specific Account (Acct. 4) AND Company (Co. 8). If so, then 99 is returned as a new category value for that row of the new column. If not, then the original Inventory Category is returned as a value for that row of the new column. (Obviously, you would edit this formula accordingly, to support your account, company, and new inventory category values.)
Here's the result:
Then I could delete the original Inventory Category column and rename the remaining New Inventory Category column to Inventory Category.

UNIQUE formula in Google Sheets for multiple ranges

I have a list of participants in column A. A full employee list in column B. I want to get the list of non-participants in column C. Basically 'B-A' but in list form.
'January' is the participants list:
try:
=FILTER(A:A; NOT(COUNTIF(B:B; A:A)))
It is always an added challenge to write formulas when we don't have access to actual date. But based on what I can see, try this formula in the top cell of any empty column:
=ArrayFormula({"My Header"; FILTER(R2:R,ISERROR(VLOOKUP(TRIM(R2:R),TRIM(T2:T),1,FALSE)))})
You can change "My Header" to something meaningful.
The next part means "FILTER in anything in the range R2:R that cannot be found [i.e., ISERROR(VLOOKUP(...))] in T2:T."
TRIM is used just to account for any accidental/stray spaces that may occur in either list, since that would result in no match if one or the other had extra space.
If this does not do what you expect, please share a link to a sample spreadsheet.

How do I create a list of unique entries while also eliminating entries that are siblings?

I have a spreadsheet used for after school pickup procedures.
QR Codes are scanned into the "Entry" Sheet.
Scan is student ID.
Student IDs are linked to student name, teacher, grade, and
siblings' ID numbers.
I want to run some analytics on students.
"Analytics" sheet pulls in a unique() of student IDs scanned.
However, some are repeated due to the siblings' code also being
scanned.
I need "Analytics" sheet, column A to exclude values that are
siblings (columns B through E).
https://docs.google.com/spreadsheets/d/1FteL9g1kMd9CFmzg_Ly3uNy05ZlGA86_YPi-1cqhac0/edit?usp=sharing
=SORT(UNIQUE(FILTER(Entry!B2:B,
NOT(REGEXMATCH(Entry!B2:B, TEXTJOIN("|", 1, B2:E))))))

powerBI map doesnt show cities

Im trying to show provinces and then drill down to show cities in powerbi map (Aug, 2018 version).
My problem is it does show provinces but when I drill down to get a look at cities, it doesnt show anything.
I also changed column "city" to "place", but nothing happened.
(Note: they are Iran's province/cities, maybe this problem is related to that. because when I change for example my city "Kāshān" from province of "Isfahan" to "Redcar" or "London" it loads nicely on these two cities)
So, what is the solution?
Thanks a lot in advance.
Create a new column called "Location" or "Place" by merging the City and Province columns. You can use a comma (,) as a separator. For example - "Alabama, USA".
Then change the category of the new column to Place. This will solve your issue. The map will be plotted correctly.