Google Sheets value function - google-sheets

Hi First off I am a beginner with Google Sheets, and I am tasked with this issue.
I'd like to create a sheet (sheet 3) that can take values from sheet 2 but have a different value in sheet 3.
Here is my idea using the values in mind;
I want the "present" value from sheet 2 to equal "0" value in sheet 3
I want the "less than 10mins" value from sheet 2 to equal "+1" value in sheet 3
I want the "more than 10mins" value from sheet 2 to equal "+2" value in sheet 3
I want the "unexcused" value from sheet 2 to equal "+5" value in sheet 3
I want the "excused" value from sheet 2 to equal "0" value in sheet 3
There are multiple columns that account for single individuals.
So if person A, had the value "unexcused" in sheet 2 on 03/07/19, I want person A to have +5 added to his total from before, maybe from previous weeks his total was 2, so after the value "unexcused" was added on 03/07/19, he would now have 7 for his up to date total. I'd also like to be able to manually add or subtract a number from the data but not alter the function if possible.
I apologize if I have done a poor job of explaining, or have omitted some details, thank you for your time.

=IF(Sheet2!A1="present",0,)
=IF(Sheet2!A1="less than 10mins","+1",)
=IF(Sheet2!A1="more than 10mins","+2",)
=IF(Sheet2!A1="unexcused","+5",)
=IF(Sheet2!A1="excused",0,)

Related

Find column with specific value, then get average of cells below

My Google Sheets has sheets that look something like this
Sheet1:
Date
Object 1
Object 2
Group A
Any Date
1
3
Group B
Any Date
2
4
Sheet2:
Date
Object 2
Object 5
a
b
Group C
Any Date
5
6
Now what I want is a formula for any a and b, that checks which object it belongs to, and gets all values, in the last 6 months, in the column of that object across all specified sheets, obviously without including itself.
In this case, a would be the average of 5, 3 and 4, so 4. Because 5 is in the same column as a, and 3 & 4 are in the column with object 2, which is the object a is in.
Basically because a is in the object 2 column, I want the average of all values of object 2.
In the case of b however, 6 should be the result because there is no object 5 in the other sheet (it may be in other sheets though) and therefore it takes the average of just 6.
Sheet1 does not care what is in Sheet2, there is at least one other Sheet, aside from Sheet1, that Sheet2 will get its values from.
Currently Im doing it manually, but for any change I have to check all sheets for cells that that would be affected. That would take too much time in the future though, as the amount of data will increase.
The formula for now looks like this:
=(SUMIF($D6:$D;">=" & edate(today();-6); S6:S) + SUMIF('Sheet1'!$D6:$D;">=" & edate(today();-6); 'Sheet1'!S6:S))/(COUNTIF($D6:$D;">=" & edate(today();-6)) + (COUNTIF('Sheet1'!$D6:$D;">=" & edate(today();-6))))
In my sheets column D has the Dates, and starting with Column S comes the Data. a and b are all in the first 5 rows, so they are never included.
This can probably be done with a Query or Arrayformula, but Im not good enough with those. I was at most able to recreate the edate portion of the formula.

G-SHEET lookup with multiple criteria horizontal and vertical

If you could help me finding a formula that would solve my problem that I've been searching for a solution a few days now
So in my "feuil 1" I have what I'm searching for according to multiple values
-the aircraft number
-data 1
-cell number
-exit date (the value that I'm looking for)
And in another sheet "LH Synthèse" (the database) I have the aircraft number and data 1 in the same row and the cell number that will give me the exit date according to a specific aircraft and data 1 is the column value
What I want to do with this spreadsheet is to have a formula that is going to give me the exit date (present in the sheet "LH Synthèse") according to the values that are in the column A, B, C in the sheet "feuil 1"
The link of the spreadsheet in case my description isn't clear enough
https://docs.google.com/spreadsheets/d/1W4jVDT4wiui5h7i9Sx9rptyLnExhQvn9ICEDTFyat0E/edit?usp=drivesdk
Thanks for your help in advance
What I tried:
Index and match function
Filter function
Vlookup
use:
=INDEX(IFNA(VLOOKUP(A2&B2&C2; SPLIT(FLATTEN('LH Synthèse '!A3:A100&'LH Synthèse '!B3:B100&'LH Synthèse '!C2:K2&"×"&'LH Synthèse '!C3:K100); "×"); 2; 0)))

How to add two values together if condition is met, else keep value currently in cell?

I have two tables that are referencing each other. This google sheet is an inventory calculator designed to make inventory tracking easier.
Search Value Box = "Wooden Stick"
Value 1
Value 2
Value 3
1
1
10
Seperate but joined sheet:
Total
10
=IF(AND(Sheet1!A2=Sheet1!B2, [search value box] = "Wooden Stick"), Sheet1!A2+Sheet1!C2 [change value of sheet2!A2 to sum], [keep value of sheet2!A2 the same as it was])
A2 and B2 of sheet1 must match to add the values (prevents errors from happening as easily). Search box finds the item by name and associates C2 with the value in inventory. I want to keep the initial value if the conditions are not met, elsewise add the two together.
I am struggling with this, as there seems to be no way around this. Any ideas would be amazing.
A2 is added to C2 then placed in A1 of sheet2 as total value if conditions are met, therefore adding the prior value of A1 sheet2 and A2 sheet2 together and giving the new value so that one doesn't need to alter this value by searching through the large sheet that contains possible inventory items.

Creating a list of top 5 occuring UNIQUE values (text) between 2 date ranges

I am hoping someone can help me. I am aiming to create a list of unique values (in this case email addresses) that occur the most in a column between 2 date ranges. I have 1 sheet with data (sheet 1) and another where I am creating this list (sheet 2).
So far I have managed to do this by adding a new column in sheet 1 with =IF(D2="","",COUNTIF(D:D,D2)) to the data.
Then using the below to list all unique values + count (sheet2)
=SORT(UNIQUE({'1st line appeals data'!B:B,'1st line appeals data'!D:D}))
Then using the below to select the top 5 occuring text + count (sheet 2)
=QUERY(AF:AG,"Select AF, AG where AF<>'' Order by AG Desc limit 5")
This works perfectly but what I want to do now is to add a between and to date value to the top 5.
In sheet 2, A5 I have date from value and sheet 2,A6 I have date to.
The numbers represented in A5,A6 are week numbers. I am hoping to reference them to the week numbers listed in sheet 2 something like - '1st line appeals data'!$A:$A,">="&$A$5,'1st line appeals data'!$A:$A,"<="&$A$6
Demo sheet here - https://docs.google.com/spreadsheets/d/1zMJ17LM7iA9a18WGbJ2IIuQAU_aS49cyn2K2X1bp6ts/edit#gid=0
Any help would be hugely appreciated
Thanks

Excel Count and Multiply cells between sheets

I have 2 sheets, Sheet 1 and Sheet 2.
In Sheet 1 is a list of Vacancies in one cell and next to it is the Name of the person who has those Vacancies.
In Sheet 2 I am trying to find the TOTAL amount of Vacancies that each person listed has using a Formula
=COUNTIF(Sheet1!B:B,A2)
The only problem is that it needs to count in Sheet 1 how many vacancies a specific person has.
eg: it shows John has 3 vacancies when he should have 11.
Added a SUMIF attempt
The issue is that you should use SUMIF() instead of COUNTIF() as per the comments above, though since you are not using Excel but Google Spreadsheets, this opens up other options (note, the two look alike but are actually very different).
You could try utilize QUERY():
Formula in D1:
=QUERY(A1:B,"Select B, Sum(A) where A is not null group by B label Sum(A) 'Total Vacancies'")

Resources