Stretchable white space in a cell - google-sheets

In one of my Google Sheets I have the following formula:
="Azarenka: "&countif(B$9:B,"Azarenka")
that is rendered like
| Azarenka: 4 |
but I'd prefer to have the equivalent of an \hfill in TeX
| Azarenka: 4 |
Is this possible?

Probably not possible without some scripts reading the column width in pixels.
Why not have a column for the names, and another column with the scores? Then get rid of gridlines (View>Gridlines>uncheck). Then add some borders in the appropriate places and color to get the right effect?

Related

How to change the cell colors of a column according to the cell's value distance to the column average?

I am building a spreadsheet with a column with values that I would like to create a more visual way to identify discrepancies. So I would like to change the colors of the cells in a column according to the distance from the cell value to the column average.
For example, in this column I have the following values:
8
14
1
12
6
19
Their average is 10, I would like the cells to automatically have the colors:
8 (lighter red)
14 (green)
1 (darker red)
12 (lighter green)
6 (red)
19 (darker green)
I thought about averaging this column in a cell and putting color conditional formatting for values larger and smaller than this column mean. But in this case, my cells would have only two colors: red for below-average values and green for above-average values. Is there any way to change the color of these columns according to the discrepancy with the average of that column? Thanks in advance.
in Google Sheets it's like this:
You can use Color Scales in Conditional Formatting for this: Select a New Rule With your Desired colors for Minimum & Maximum Value
Result:
Same Goes if you are using Google Sheets. Goto Format>Conditional Formatting> Color Scales
Assuming you have excel 2016 or newer, simply highlight the data you want to have included, and then click Conditional Formatting (from the "Home" ribbon), then click "Color Scales" and pick the desired one.
After setting the color scale, you can then modify it by selecting the same data, and then clicking "modify rules". What you've stated is a 2-color scale, and that is one of the options you can choose if you go back and edit the rules.

How to set jira table's column width

I struggled with this question for some time and was able to find the solution. The idea is that my script automatically generates a data, puts it into table and there are some columns that should preserve their width (should not be less then something). But jira markup sets table column width dynamically basing on screen resolution and data that is preserved in all the table columns. And noformat for data cells did not help me because there was some symbols in those columns that required jira markup. I am not jira admin so using advanced plugins and jira scripts is not an option.
Solution was to set the table headers names with noformat. If you need a wider table, just add some spaces to the header and wrap it in noformat. And jira will keep the column width basing on that preformatted header.
So example would be:
||{noformat}Header1 {noformat}||Header2||{noformat} Header3 {noformat}||Header4||
|data1|data2|data3|data4|
....
In this example the width of columns with header2 and header4 will be generated dynamically depending on which's content is longer (the column width could be even set dynamically to 1 symbol). While width of header1 and header3 will never be smaller then the length of the column name.
This solution does not allow to set the width of the column, but at least it allows to make some columns to be wide enough to show data correctly.
Since noformat does not look very pretty, i got anonther solution here, which probably is the prettiest one (when you look at the result and not the markup):
I just created a transparent image with a size of 1x1px and inserted it in the column headers with the minimum size I wanted the columns to be. In order to make the header text vertically centered, I needed to insert it before and after the text. See the following example:
|| !transparent.png|width=300px, height=1px! Col1 !transparent.png|width=300px, height=1px! || Col2 || Col3 ||
|| Row header | Content of column 1 | Content of column 2 |
A lot of HTML non-breaking line spaces.. i.e.
so a header will contain code like this..
|| Field Description ||Reserved Field||
It's a bit icky but it works in shifting the centre and expanding the column width. sadly this is limited to other content too but a lot prettier than {noformat}. Doesn't allow fixed sizing but better than squashed columns
e.g.
Formatted table with better column width
Jira seems to expand the width of the right column to fit the contents, and this can squeeze the left column so that it doesn't fit it's contents.
A workaround for this particular issue is to restrict the width of content in the right column until the left column has enough width to render properly.
One way to do this is to enter new lines into the content.
|| Parameter || Meaning ||
| a term | A definition which contains
lines breaks.|
The {noformat} solution did not work for me and I don't have admin access to add a plugin, so I created a Chrome extension to set the minimum column width to 100 pixels. Kind of silly that it had to come to this but it gets the job done.
https://chrome.google.com/webstore/detail/jira-table-width-fixer/lgbgknkgpchdholdabagddphgaildolf/related
Brain-dead brain dead solution: fill header with underscores. The "noformat" trick was too ugly even for me, the didn't work, I don't have permissions (or I'm too lazy) to find/use/install a transparent jpg... So I just used underscores. Making the header text "space-less" ("dont_squish_me" instead of "dont squish me") prevents Jira from line wrapping.
|| build || dont_squish_me || really_long_field____________________________________ ||
| [22|http://jenkins/job/JOB/22] | 5:27:50 | some extra text that might wrap |
| [23|http://jenkins/job/JOB/23] | 4:19:22 | more wrappable |
I googled for invisible unicode character, which is not a space, thus JIRA won't trimm it. The first I found and copy pasted in visuell mode while editing the table header of a JIRA comment, did the magic and I could adjust the needed column width. (Although I had to replace my spaces in the text if there were any or any other whitespace characters which could make JIRA break my header into more lines.
This was the unicode character I used: https://www.compart.com/de/unicode/U+2800
(copy the text from the box)
You should place them all in the same table for the columns widths to be the same (do not provide any space tables); for example
||Table1Col1||Table1Col2||Table1Col1Comment|Table1Col2Comment|
||Table2Col1||Table2Col2||Table2Col1Comment|Table2Col2Comment|
Hoepfully this should work.

Google Sheets, Conditional Formatting by Percentage Categories

I'm looking to create some conditional formatting based upon a set of three percentage categories (please see the following sheet), where a color is applied to multiple cells, but not all in a row:
90% - 100%: Green
50% - 89%: Yellow
0% - 49%: Red
I'm able to get the percentages to change color based upon their content, but so far I've not been able to apply this change to the other cells. Is there a conditional formatting custom formula that I can use to do this?
For range F3:H26 make 2 rulus with 'your formula':
=$F3>=0.9 -- green
=$F3>=0.5 -- yellow
and paint the range in red.
That's it!
Look at example
Select all the cells that you want the rule to apply to
Go to: Format > conditional formatting then in the tool bar on the right, click add new rule
By format cell if section select "is between" and enter the criteria. Hit done
Now click add new rule below the first one and repeat as above
this should work
When putting in conditional formatting with cell that has a percentage value in it you need to give ranges in the range of 0 to 1. In other word to set a format for range between 10% and 40% you would select "Is Between" and for values put in 0.1 and 0.4. This will apply formatting correctly. For percentages over 100% use 1.xx over 200% 2.xx etc...

Making Conditional Formatting for a SUMIF filter in Google Sheets relative?

I have a handy little Google Sheet formula that applies a color given a summed total but I can't get that formula to be relative. I suspect this is either an easy genius fix or currently impossible in Sheets. Any help?
Sorry I can't post images, here's a rough simulation of my table a1 - b4
John Doe | 25%
Martha Roe | 25%
John Doe | 75%
Jane Doe | 25%
In the table above, I'm using Conditional formatting to "Format cells if..custom formula is..." and my formula sums up the values in Column B for John Roe and Martha Roe (Column A) and turns both the name and value cell red if that value exceeds 100%. I use the formula below:
=sum(filter(B$1:$B4,A$1:A$4 = A1)) >= 100%
(Full credit to Spreadsheetpro.net's article for the intro SUMIFS, COUNTIFS, & AVERAGEIFS functions in Google Spreadsheet.)
Unfortunately, when I use this conditional formatting approach and drag that formula to the next cell in the row, it still thinks I mean A1 (not A2); it's just applying that original formula to multiple rows. So right now I need to manually change the formula for each cell. Maddening.
What I'd like to do is have it update relative to what cell it's in. To make it easier, I'd be ok if there was a way to tell it in the formula "use the cell I'm in" (instead of specifying A1).
Is there a way I can fix my current formula so Google knows that A1is relative? OR, barring that
Is there a way to use conditioning formatting with a formula so it knows the use the current cell in the formula?
Thanks!
The trick is to not drag the formula per se, but apply it to the range you require. The formula will be propagated across that range, respecting absolute and relative references as if you were dragging an in-cell spreadsheet formula over a range.
In your case, I think you just need to apply:
=SUM(FILTER($B$1:$B$4,$A$1:$A$4=$A1))>=100%
to the range A1:B4.
It can help conceptualise what is going on by just plugging that formula into a spare spreadsheet cell, and dragging it over a 2x4 range of cells.

How to display a content in two-column layout in LaTeX?

I am writing an article in LaTeX and I would like to display some content in two column layout. In the left column a matrix and in the right column a list of items. I have tried with tabular environment but it does not work as I want.
My question is how to create a two column area in a LeTeX document (or something similar) and be able to put certain content to left and right column? I do not want to create a two-column layout for whole document, only for part of it.
Load the multicol package, like this \usepackage{multicol}. Then use:
\begin{multicols}{2}
Column 1
\columnbreak
Column 2
\end{multicols}
If you omit the \columnbreak, the columns will balance automatically.
Use two minipages.
\begin{minipage}[position]{width}
text
\end{minipage}

Resources