TRANSPOSE and leave 3 blank cells between each outputted cell value - google-sheets

I'm trying to transpose a column of different values into a row with only uniques, where there is a space of three empty cells between each outputted value. current output vs. desired output If anyone has an idea of how to approach this, your input would be greatly appreciated. Thanks y'all

Try
=transpose(flatten(index({unique(A2:A11),
iferror(sequence(countunique(A2:A11),3)/0)})))
Essentially, we are creating a virtual array with the unique values in A2:A11 and 3 blank columns, flattening it and finally transposing it.

Related

Displace output from formula into another cell - Google Sheets

I would like the array result of a formula to be displaced/displayed somewhere else. In this instance it should appear down a row.
For this case, it can be done by padding out the first row of a wrap around array, but it's not very pretty and is not dynamic. (It must be ammended if the number of array columns changes.)
={"","","","";query(A1:D5)}
Is there a better more generic way to do this?
try:
={INDEX(IFERROR(SEQUENCE(1, COLUMNS(A:D))/0)); QUERY(A1:D5)}
You can do it with IFERROR(.../0) combined with SEQUENCE(), COLUMN() or ROW().
Something along the lines of
=arrayformula({iferror(sequence(1,columns(A1:D5))/0);query(A1:D5)})

Transposing Column Values to Row With Merged Cells in Google Spreadsheets

There is a table in which the data is presented as in three rows, A1:BK3. My task is to switch this data from going across the columns, to down rows, as shown in cells A10:C41
I was able to implement only the data output for the DAY, but I do not know how to output the data for the NIGHT.
Any help would be welcome. Thanks
I think you just need to adjust the column by one to the right. This seemed to work...
=INDEX($B$1:$BK$3; MATCH($A$3; $A$1:$A$3; 0); MATCH($A11; $B$2:$BK$2; 0)+1)

How to delete empty cells and shift up in Google Sheets?

Is there a way to delete empty cells in a given range and shift the column up to the desired display as shown below? Closest I came was
=ARRAYFORMULA({A1:C1; TRANSPOSE(SPLIT(TRANSPOSE(QUERY(A2:C,,999^99)), " "))})
which removes empty cells, but splits the first names and surnames into separate cells, which I have not figured out how to avoid. Pfa a made-up sample of current and desired displays:
Current Display
Desired Display
I'm new at this, but I came up with a bit of a brute force method, which may help you.
={
{(A1:C1)};
{FILTER(A2:A100,A2:A100<>"");indirect("N1:N" & 100-counta(A2:A100))},
{FILTER(B2:B100,B2:B100<>"");indirect("N1:N" & 100-counta(B2:B100))},
{FILTER(C2:C100,C2:C100<>"");indirect("N1:N" & 100-counta(C2:C100))}}
Assuming your data block is in columns A1:C100, this formula filters blank cells from each individual column, and then pads each column with blank cells at the bottom, to make the three arrays equal in length/dimension.
Note that in "100-counta(...", the 100 is the expected maximum length of your data column.
This could be calculated, and must be the same for all three columns.
Note also that the first array is horizontal (ends with a semi-colon), followed by the three columns, stacked beside each other (ends with a comma).
Here is a working example.
https://docs.google.com/spreadsheets/d/1MGaqqGrkmIliuAzEqxPtdEVZXWPN2K5W7jFFM-ZnwgE/edit?usp=sharing
If I missed something you were trying to achieve, let me know.
Also, I'm sure that there is a more elegant way to do this, or one not requiring the use of a block of "reserved" blank cells, but I couldn't think of that at the moment.
Edit: The formula as follows also works. But you need to remember to set the "100" value to be equal to the number of rows in your data block, since we pad the columns with the necessary number of blanks rows, after removing the blank cells in each column.
={
{(A1:C1)};
{FILTER(A2:A,A2:A<>"");indirect("N1:N" & 100-counta(A2:A))},
{FILTER(B2:B,B2:B<>"");indirect("N1:N" & 100-counta(B2:B))},
{FILTER(C2:C,C2:C<>"");indirect("N1:N" & 100-counta(C2:C))}}

Google Sheets: Conditional formatting on Multiple Rows based on multiple cell values

I am trying to use conditional formatting to color a column based on the value of the column itself, plus another column. But I am having issues.
If the value in H is "Race Expense" and the K cell is empty, I want the K cell to be colored in red. But as you can see below, it is not working. The results I am getting (the colored cells) are incorrect.
Here's my format condition:
Here's the actual formula (since you can not see all of it above):
=AND(($K667=""),($H667="Race Expense"))
Any ideas what's wrong?
Ok, so I feel like an idiot. Thanks to a comment on my original post the issue is solved.
Since my selected range was K666:K671, I had to modify my formula to use the first row of the range.
I was originally using this formula:
=AND(($K667=""),($H667="Race Expense"))
But by just changing it to this one it solved the issue:
=AND(($K666=""),($H666="Race Expense"))

Find the largest three numbers in a row

Can anyone guide me in finding the three largest values, and sum them up in the column "I"?
And also need to highlight the top three values in each row.
For example, in this image, I want to find the largest three from D,E,F,G columns in each row and SUM of largest three should be filled in column "I".
You can use the large formula,
I'm sure there is a better way, but if there is an error you can use the iferror() so if there is an error the value will show up as 0.
=IFERROR(LARGE(D2:G2,1),0)+IFERROR(LARGE(D2:G2,2),0+IFERROR(LARGE(D2:G2,3),0))

Resources