Formula Moving Data To Second Page If Criteria in Range is Met - if-statement

I'm working on a Google Sheet Project that will move data from one page to another. I need the formula to search a range ( 'Booth Placement'!O2:O1000=133), if a cell is equal to the set value it will then write the data from the same row 'Booth Placement'!A2:A1000.
I know the IF can only work for one column and not a range spanning multiple columns. What should I switch the formula below?
=IF('Booth Placement'!O2:O1000=133,'Booth Placement'!A2:A1000,"")
I am trying to keep this formula as simple as possible since I will have to change the value it is searching for on each cell on the second page. I've googled this for two days and I'm pretty sure I'm just missing the obvious. Any/All Help is appreciated.

try:
=FILTER('Booth Placement'!A2:A1000; 'Booth Placement'!O2:O1000=133)
or:
=ARRAYFORMULA(IF('Booth Placement'!O2:O1000=133; 'Booth Placement'!A2:A1000; ))

Related

How to automatically feed a cell value from a range of values, based on its matching condition with other cell value

I'm making a time-spending tracker based on the work I do every hour of the day.
Now, suppose I have 28 types of work listed in my tracker (which I also have to increase from time to time), and I have about 8 significance values that I have decided to relate to these 28 types of work, predefined.
I want that, as soon as I enter a type of work in cell 1 - I want the adjacent cell 2 to get automatically populated with a significance value (from a range of 8 values) that is pre-definitely set by me.
Every time I input a new or old occurrence of a type of work, the adjacent cell should automatically get matched with its relevant significance value & automatically get populated in real-time.
I know how to do it using IF, IFS, and IF_OR conditions, but I feel that based on the ever-expanding types of work & significance values, the above formulas will be very big, complicated, and repetitive in the future. I feel there's a more efficient way to achieve it. Also, I don't want it to be selected from a drop-down list.
Guys, please help me out with the most efficient way to handle this. TUIA :)
Also, I've added a snapshot and a sample sheet describing the problem.
Sample sheet
XLOOKUP() may work. Try-
=XLOOKUP(D2,A2:A,B2:B)
Or FILTER() function like-
=FILTER(B2:B,A2:A=D2)
You can use this formula for a whole column:
=INDEX(IFERROR(VLOOKUP(C14:C,A2:B9,2,0)))
Adapt the ranges to your actual tables in order to include in the second argument all the potential values and their significances
This is the formula, that worked for me (for anybody's reference):
I created another reference sheet, stating the types of work & their significance. From that sheet, I'm using either vlookup, filter, xlookup.Using gforms for inputting my data.
=ARRAYFORMULA(IFS(ROW(D:D)=1,"Significance",A:A="","",TRUE,VLOOKUP(D:D,Reference!$A:$B,2,0)))

In Libreoffice Calc, which formula will check if a a keyword or part of it is contained in a cell in a row and copy the entire content of that cell?

I am learning how to use formulas in spreadsheets, I do use libre office.
I need to sort out data in a quite huge messy spreadsheet.
Each column contains mixed data, the sheet is huge, dozens of columns and thousands of rows, if the spreadsheet does not contain errors each cell in a row either contains a different keyword or is empty, there should not be two cells in the same row containing the same keyword.
The problem to solve is to sort out all the data so to reach to have a new spreadsheet in which each cell marked with a given specific keyword is kept in the same position but placed in one column dedicated to that same keyword.
the kind of spreadsheet with mixed up cells to be sorted out
the data in the spreadsheet has to be fixed so to appear in this way
A formula that can be used to extract sorted out data from a cell is the following:
=IF(SEARCH("Text1";B2;1);B2;0)
The formula can be dragged to each cell below to hit the proper cell next to it. The result is correct.
The results are correct, but I do not know why the expected 0 is not printed, there is #VALUE! instead
The logic is very simple, if the cell contains the keyword or any other text that contains that keyword the result is the full content of that cell, otherwise the result is 0.
Here comes the first question, why do I get #VALUE! as a result for those cells that do not contain the keyword? I expected to get 0 instead, just as indicated in the formula,
I tried to leave this filed empty and also to put the 0 result in quotes, the actual result is always the same, #VALUE!...
However, of course this formula extracts only the information contained in one column, so for each other column the process must be repeated.
In order to avoid to create a column with the formula for each column in the spreadsheet or anyway to process each column one by one and more importantly to have then to merge all the results to form one columns containing only cells with a given keyword I thought to use the same formula extending the parsing to each next cell in the row as follows:
=IF(SEARCH("text";B2;1);B2;IF(SEARCH("text";C2;1);C2;IF(SEARCH("text";D2;1);D2;0)))
The logic is very simple and should output in one go a column containing all the cells containing the keyword that are found in the row, check if the first cell in the row contains a word using the search function, if does then the result is the content of that cell, otherwise perform the next test, the next test is the same, check if the next cell contains a certain word using the search function, if does then the result is the content of that cell, otherwise proceed to the next test…. and so on until last test, if no test gave a true result then print 0 (but we get #VALUE!, OK I could live with that...).
In theory should work for a any number of cells, but in the practice does not at all, in fact does work only for the first IF test and cell indicated in the formula.
WHY?
The result using the extended version of the formula to parse N cells in sequence is the same obtained with the simple formula to parse only one cell
Finally, how do I resolve this problem using IF and Search?
Is there any other better approach and way to solve this kind of problems and sort out data in huge spreadsheets of this kind?
Thank you for any hint and help.

Google Sheets: Sum a Value Range Within a Specified Time Frame

I'm trying to sum a range of values, within a given time frame. The time frame could be x hours, or y days, etc. An example:
So for each row, I need to sum the last hours or days as specified in cells C2:E2, which are numeric (just added formatting to show the text). Note that the datetime values do not follow any interval pattern, but are always sequential.
Although I've tried searching SO, and via Google, I haven't been able to find a way to do this.
Any suggestions would be very welcome.
[Edit]
I've added to a link to an example sheet of what I'm trying to do... pls just ask if I can add any further info!
Test Sum By Time
try:
=SUMIFS(B3:B, A3:A, ">="&NOW()-1)
=SUMIFS(B3:B, A3:A, ">="&NOW()-7)
In Google sheets, use the =TODAY() code to for today's date and put this in another cell. You could always create a new sheet (which we will call sheet3) which you hide afterwards. Let's imagine you put this in cell A1.
You can use the =IMPORTRANGE("the google sheets website link", "Sheet Name!A3:A31" to insert the values. Let's imagine you import this into B3:B31. In C3, you put =IF(REGEXMATCH(B3, A1), 1, 0).
You continue this in each cell from B4:B31, each time changing "B3" to the current row number. Then we can use the =SUM(C3:C31) code to count how many meet this condition. Let's imagine you put this in A2.
Now back to the original sheet. Use `=IMPORTRANGE("the google sheets website link", "sheet3!A2" in the cell C3.
For the other 2, I don't know, sorry!

Nested IF function inside a vlookup for google sheets

I'm trying to nest an IF function inside a vlookup to filter data based on a cell in another sheet.
The ideal functionality would be for the cell to return data if it meets a specific criteria otherwise leave it blank.
This is what I have so far:
=IFERROR(vlookup(E2,IF('internal_all[Paste Here]'!H3="Indexable",'internal_all[Paste Here]'!A:AB,""),28,0))
Currently, it doesn't work but instead I get an error "VLOOKUP equates to an out of bounds range".
Any help would be much appreciated.
Here's a copy of my gsheet: https://docs.google.com/spreadsheets/d/13mcOOHIP6-YQKOhE_LHnmu3-7bSNKzvCSTVZ5BnTxPA/edit#gid=0
Here's an example of the error I'm running into:
If I understand your question correctly...Then all you would need to change is where you put the if. Including it in the Vlookup will mess with the size of range ie. A:AB has a size of 28 but "" has a size of 0. I would also change your formula to an array so you don't have 6000+ formulas calculating. Finally, I would add an array_constrain to stop the array at the end of your dataset. Here is a working example:
=Array_Constrain(ArrayFormula(IF('internal_all [Paste Here]'!B2:B="Indexable",vlookup(E2:E,'internal_all [Paste Here]'!A2:AB,28,0),"")),CountIf(A2:A,"<>"),1)
I also included that formula in H2 of your "internal links point to canonicalised URLs" tab. Good luck!
Edit:
After looking at the setup again, this updated formula should work.
=Array_Constrain(ArrayFormula(if(VLOOKUP(E2:E,'internal_all [Paste Here]'!A:B,2)="Indexable",vlookup(E2:E,'internal_all [Paste Here]'!A2:AB,28,0),)),CountIf(A2:A,"<>"),1)
Also, here is an updated Indexability formula for column G
=Array_Constrain(ArrayFormula(IFERROR(vlookup(G2:G,'internal_all [Paste Here]'!A:B,2,0))),CountIf(A2:A,"<>"),1)

How to apply conditional formatting (if cell is in another range) to a range of cells

So I have searched through several different questions related to this. None of them seem to be asking exactly what I'm looking for and none of the solutions I've found have worked for me thus far.
I have several columns of data (Player names) where each column's values are generated from a formula in the 2nd row of that column. The 1st row is a header (Game name). This whole range is the collection of which players are willing to play which games. These are columns D-J(ish, the list is dynamically generated with another formula, based on form responses)
I have another range of data where the 1st column is the Player and the 2nd is the player's PREFERRED game. This data is also generated with a formula based on form responses. These are columns A-B.
Here's what I'm trying to do
Using conditional formatting in columns D-J, I want to highlight the player's name if this game (in row 1 of this column) is their preferred game (range A2:B).
I've tried several different variations of VLOOKUPS, MATCHES, and FILTERS in the conditional formatting, but so far nothing has worked. The problem I run into every time is that I can't figure out how to reference the cell that the formatting is applying to, but still have it reference each individual cell over the whole range.
I know I could do this if I applied an individual conditional formatting to each individual cell. However that is a very time consuming and inelegant solution to this issue considering I'm expecting my data range to be much larger in the future. I need a conditional formatting formula that will work across the whole range or , at the very least, for an entire column.
This is a mock of what I'm trying to accomplish:
This is a link to a mock of my sheet so that you can clearly see the data layout and specific formulas I'm using:
https://docs.google.com/spreadsheets/d/1wy1T6dWJwNC_EfdCAbkuxtkJH7y4Cg3x4IyEk6R567M/edit?usp=sharing
use:
=REGEXMATCH(D3, TEXTJOIN("|", 1, FILTER($A$3:$A, $B$3:$B=D$2)))