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

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

Related

change output cell based on different cell's value

I'm creating a spreadsheet about my paylog.
I want to have a sum where it tells me how much still needs to be payed out based on if the box next to it is y or n (y=payed out, n=payed out, which means go into the sum box)
After viewing that, this should be the result.
Based on that info then I would change up a few different things to avoid the circular dependency. For your total formula, I would use as SUMIF: =SUMIF(B:B,"n",C:C) That will only count the values in column c if column b is equal to "n". Next I would use conditional formatting to change the font color to white for all values in column c when column b is equal to "y". I've provided a demo sheet so you can view the results. This will allow you to have values in column c which will remove the circular dependency issue. Feel free to make a copy to be able to view the editable version.
Demo Sheet here
I'm sure there are many other ways to accomplish your goal but without more info...that is a direction I would go.

Using the fill handle, but skipping cells

Is it possible to use the fill handle but have the pattern skip cells? Every time I try to start with a sheet like this:
When I use the fill handle sheets does this:
I've read that you need to select the entire pattern (for example, cells A1 through A9 in the example above), but that doesn't seem to make a difference for me.
You only need the 1 in A1. Nothing below it. Select A1:A3 (i.e., the 1 and two null cells) and then pull the fill handle down.
The solution was to autofill one row with the numbers and spaces using the fill handle (selecting the first three cells) and use the concatenate function on the others to fill the cell values. After this was done, it was just a matter of copy/paste!

Google Sheets: How to make a stacked/aggregate chart

I have made a bar chart which aggregates my data, but is there any way I can split each bar based on the data it is aggregating - similar to how a stacked bar chart would look?
Here is a bad artists impression (thick blue lines mine). The idea is that it's important to know from looking at the graph if I sold 5 at £1, or 1 at £5.
Ideally this would work even if the price for each item is variable, but that is not essential (eg: if there is a 'hack' with hardcoding Apple = 3, I can live with that.)
I'm also fine inputting helper columns etc, within reason, but I would want to be able to easily continue to add things to the list on the left without having to add new helper columns each time (calculated ones are fine, of course.)
Thanks in advance.
UPDATE: With thanks to Kin Siang below, I ended up implementing a slightly modified version of their solution, which I am posting here for completeness.
I added a very large (but finite) number of helper columns to the right, with a formula in each cell which would look for the nth occurrence of the item in the main list (wrapped in an iferror to make the unused cells blank).
=iferror(index(FILTER($A:$B,$A:$A=$D2),E$1,2))
Theoretically it could run out of space one day, but I have made it suitably large that this should not be an issue. It has the advantage over the other solution that I do not need to sort or otherwise manipulate the input range and can continue trickling in data to the main list and have the chart automatically update.
Yes, it is possible to display the chart in your case, however need some data transpose in order to do so, let me show you the example with dataset
Assuming this is your original data:
First sort the data by alphabet, and enter this formula in new column
=if(G39="",1,if(G40=G39,I39+1,if(G40<>G39,1)))
Next add new column for categorical purpose, by using concatenate function
="Price"&I40
In the transform data for chart purpose, enter this formula to split all price into different row, different column for different product
=sumifs($H$40:$H$47,$G$40:$G$47,$A41,$J$40:$J$47,B$40)
After that i select stack bar chart and ensure the price in under series, in case in 23 will have some problem to set price at series correctly, you can use 33 data create stack bar chart and update the data range again, it will work also
Here is the cute chart you expected, accept if help :)
*When certain fruit has less price record, it is advised to fill in 0, as the data table need in same column (see the orange price 3), although I didnot test if blank

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.)

Multiple Layers of Matching Blank Cells

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).

Resources