Multiple Layers of Matching Blank Cells - google-sheets

I'm back with another Google Sheets question. This one isn't scripting though - this time I'm looking for help in figuring out a formula.
I've attached screenshots of two sheets. The first one features one "opposing party" at row 8. The second one features an opposing part at row 8 and a second opposing party at row 9. Cell B3's formula is shown in both; in essence, Cell B3 looks for the first blank cell in column L after Row 10 (or Row 11 in the second image) and returns the contents of that row's "F" column. This allows me to "get" the next deadline in the matter that is being tracked. For those interested, yes, Cell D3 has a similar formula looking at K.
Currently, we have to manually update B3 (and D3) if we add additional parties (not necessarily opposing, and not just one either). This is more tedious than I would like. I would like a formula that would return "F10" and "L10" in situations where only one opposing party appears, "F11" and "L11" if there is an additional, and so on so that even if we have a massive, multi-party action it will still return the next cell.
If it helps, you can always assume that there will be a blank set of cells below the last "opposing party" and the row that we want to start querying (as shown in the second image).
I'd love any help that you can give. Please let me know if you need anything clarified.
Thanks a ton!
--Databoy2k

Is this what you require for B3?
=index(F:F, match("rule", I:I, 0)+1)
In a larger scope use,
=index(indirect("F"&match("Rule",I:I,0)&":F"), match(TRUE, index(isblank(indirect("L"&match("Rule",I:I,0)&":L")),0,0),0))

I think the easiest way would be to make the cells you are referencing a named range. That way, you can add as many other rows, columns, cells, whatever, and your formula will always reference the same range of cells.
For example, you could name the range of cells in column F 'Steps', and in K 'Deadline', then change your formula to =index(Steps,match(TRUE, index(isblank(Deadline),0,0),0)), and it will always give you the correct range.
Here's a pic to show how to name a range (right-click on the selection).

Related

I'm looking for a Google Sheet array function to add specific increments in each row

Here's how it looks.
Hi. I'll try to be as specific as possible about this :)
I'm making a Google Sheet page similarly to a game character progression, that will automatically fill up based on data from other sheets: specifically, these "EXP" bars fill up with values based on the hidden cell A5.
For instance, the cells from D5 to BA5 represent LV1.
As the function shows, every time the value in A5 reaches an even number (for LV1, it's all even numbers from 2 to 100), one of the slots will fill up with a number, that with conditional formatting, will change the color of the cell and make it look like an actual exp bar filling up.
I'm using the function =COUNTIF(A5,">=2") and manually changing it to ">=4", ">=6" etc until ">=100" for the first bar. The second bar will have its 50 cells with all even numbers from ">=102" to ">=200".
So, to get to the question: is there an array formula that facilitates the process of filling a great amount of these bars with functions, without changing them all manually? Even automating *some *of this process would be great. Besides it being tedious, it leaves a lot of room for human error.
Thank you in advance to whoever's got an answer.
P
I haven't tried much as at the moment I am very confused by the vast amount of options array formulas provide. I have 48h of experience in the matter.
I suggest you to use the values of columns and rows here as helpers to do calculations. If you know that every column adds 2 and every row adds 100 you can set a formula like this for the whole range (select the whole range and add just one rule of conditional formatting):
=$A$5>((Column(D5)-3)*2+(Row(D5)-5)*100))
You use $symbol to make A5 steady and D5 value will "move" to each cell for conditional formatting, so you don't have to make an ARRAYFORMULA for this

How to Transpose Rows to Columns Towards Left Columns? In Google Sheet

SECOND IMAGE CLICK NUMBER 1 I Want To Transpose Row Value Range A2:A50 To Column CZ2 To BC2. Formula Should Be Given IN CZ2. AND VALUE SHOULD GET IN REVERSE OR LEFT COLUMNS.[First IMAGE Click Number 2] 2. If I Give Transpose (AO2:AO50) In CZ2 it Will go range from CZ2 To EW2. I Want Transpose in Reverse Columns. If I Increase Row Value AO2:AO60 It Should Flow Towards Left From CZ2 To AS2. I Mean Transpose Should work towards Left Side Columns. Its Ok with any other formula If Not Transpose. Hope My Question is Understandable. Someone Help Me Out. Thank You In Advance.
It's not clear why you would want to do this. However, the end goal can be achieved by placing the following formula in cell B2 (not CZ2):
=ArrayFormula(IFERROR(VLOOKUP(COLUMNS(B1:1)-COLUMN(B1:1)+ROW(A2)+1,{ROW(A2:A),A2:A},2,FALSE)))
Try it and you'll see what I mean.
The formula is written to be flexible. So if you add or subtract data from A2:A, the value in A2 will always be in Row 2 of the last column to the right in the sheet; and all other values will work backward from there.
If you always want to start to backward progression in Column CZ and Column CZ is not (or may not always be) your rightmost column, you can use this version:
=ArrayFormula(IFERROR(VLOOKUP(COLUMN(CZ1)-COLUMN(B1:CZ1)+ROW(A2)+1,{ROW(A2:A),A2:A},2,FALSE)))
Just understand that, if you don't have columns at least through Column CZ, this formula will fail to work as expected.
I recommend using the first formula I supplied above, since it will always work, no matter how many columns there are, filling backward as far as to the formula column (B2) as needed.
Understand also that if you have more than 103 rows of data in A2:A, that would be more than could fit between B2 and CZ2; so only the first 103 would be displayed.
ADDENDUM (after reading first two comments below):
The principle is the same if you want to run results from "CZ to BC"; only in this case, you want to limit the results to no more than 50.
Place the following formula in BC2:
=ArrayFormula(IFERROR(VLOOKUP(SEQUENCE(1,50,ROW(A2)+50-1,-1),{ROW(A2:A),A2:A},2,FALSE)))
To reiterate, you cannot run formulas that will fill or columns backward. (Even if the sheet is set to right-to-left font with Column A appearing at the far right, the formula is still filling A-Z according to that setup.) However, if you know that you want a 50-column range reserved and you want the answers to go backward, this can still be achieved by placing the formula in the first of the 50 columns rather than the last, as I have proposed above.

Issue with conditional formatting cell range based on exact match text in one cell

We track workshop registrations in a google sheet and I'm trying to conditionally format a range of cells (A7:P14) based on the text in cell E7 (Eng DLO, Eng TBC, Sp DLO, Sp TBC).
I used the formula
=COUNTIF($E7:$E, "Eng DLO")
and A7:S14 turned the selected color (light purple). When I then added conditional formatting to turn dark purple with the formula
=COUNTIF($E7:$E, "Eng TBC")
the color wouldn't change when I changed the value in E7 from Eng DLO to Eng TBC.
I know the issue is that I need it to EXACTLY MATCH the text and I tried incorporating EXACT into the COUNTIF formula, but it would only highlight E7 or just A7:P7 instead of the whole selected range in the conditional format (A7:P14).
Here is a sample sheet with what I am hoping it will eventually look like once I get the conditional formatting to actually work (I removed the conditional formatting). https://docs.google.com/spreadsheets/d/1Bn9FVTHE1OO49p4PKo6j0Qd3c0NX6pUq3vp0pHFNGVI/edit?usp=sharing
Got a couple other issues here:
The 7 is a floating reference, so you need to fix it with $. This is the reason your formula isn't working. In the next row, it would start counting in cell E8. With the $, it works, but less efficiently than it could, which brings me to point 2.
If you're only referencing one cell, just check for equality against that one cell.
To the Eng TBC, you would use
=EXACT($E$7, "Eng TBC")
Just to demonstrate a point, without the dollar sign, the next rows cells would have been checking against this:
=EXACT($E8, "Eng TBC")
Which of course would have been empty.
A More Flexible Solution
Since you probably don't want to keep having to reformat per set of cells, you can use a ROW-based approach to tackle the issue. This one, for example, assumes 8 seats per group.
=EXACT("Eng DLO",INDIRECT("E"&(8 * INT((ROW() - 7) / 8) + 7)))
Every 8 rows, it references the next multiple of 7. (Yes, INT is FLOOR, but shorter.)

How to use arrayformula to dynamically join strings in google spreadsheet?

I use Arrayformula() to make my reports dynamic and easier to edit. For example, if I have a Column A with a list o number o blue balls in a set and a Column B with a list red balls in a set, on the cell C1 I can write =ArrayFormula(add(A1:A,B1:B)) and in the Column C will have the total of balls in each set. It would be exactly the same as writing =A1+B1 in cell C1 and dragging the formula down to the last row. Arrayformula() has some benefits, because it will work if some adds or removes rows from the sheet and also it makes the reports way more organized and easier to edit.
Since I´ve discovered arrayformula(), my life has changed, because of the fact that googleSheets expands the formula to other cells. It does not work every time, but the idea of expanding to other cells seems to be possible some way or another, here is a good example of a problem that was not resolved by arrayformula(), but has the same idea.
Keeping that idea in mind, imagine that on Column A there is a list of First Names and on Column B there is a list of Last names. On Column C I want to join this two string using a simples space. The way to do that would be in the cell C1 write =join(" ",A1,B1) and then drag down this formula. This method method however is prone to error since people can add and remove rows, deleting my formula. I want to use a formula that I can write in one single cell and it expands to other cells. I´ve tried =arrayformula(join(" ",A1:A,B1:B)), but it does not work.
Is that a way to do that using =arrayformula() or other native function?
I know I could write a script or custom formula to do that, but this is not my goal here.
I think this formula should work:
=arrayformula(A1:A&" "&B1:B)
In case you want to use a delimiter, you can do the following to have a clean result even though, A or B is not present in some cases:
ARRAYFORMULA(ifna(ifs(isblank(A1:A),,ISBLANK(B1:B),A1:A),A1:A&" - "&B1:B))

Follow formula patterns for some cells only

I am trying to get excel to follow patterns grabbing information from cells only, while keeping other cells in the formula static.
As follows:
=importxml(CONCATENATE(A1,B17),E1)
A1 = never changes
B17 = increments by 1 every time. Ex: B17, B18, B19, etc...
E1 = never changes
Right now it seems like excel is counting the number of cells from the cell I am currently in and once I try to follow that pattern it keeps counting the same number of cells to grab the cell in the pattern. (Ex: 7 cells up, so as I move down from the current cell it keeps looking for data in the cell 7 cells up from the current one, which is often, empty). Moreover, right now all cells are changing in the pattern and I only need SOME cells to follow the pattern.
I appreciate any help with this.
If I understand your question, you want to copy that formula while keeping the first and last parameters (A1 and E1) constant. That can be achieved by using the $ sign:
$A$1 will always be copied as $A$1
$A1 will be copied as $An where n is the row number - so if you copy it one row down (whatever the column) it will become $A2
A$1 will be copied as XX$1 where XX is the column - so if you copy it one column to the right, (whatever the row) it will become B$1
So in your case you would use:
=importxml(CONCATENATE($A$1,B17),$E$1)
or if you need to make the B column constant (but not the row):
=importxml(CONCATENATE($A$1,$B17),$E$1)

Resources