How to scale sparkline chart relative to cell height in Google Sheets - google-sheets

In Google Sheets, the sparkline formula appears to fill a chart fully into a cell, whatever cell width and cell height is.
Is there any option to scale the chart height relative to the cell height, something like
=sparkline(A1:A5,{"chartheight","50% of cell height"})
I have a very tall cell which stretches the chart unrealistically, which makes it harder to understand. I have over 100 charts, which is also impractical to define ymin and ymax individually in each sparkline formula and all the charts have way different vales.

Related

how to paste conditional formatting as relative cell reference or apply it on a selected range

What I try to do is to give a GREEN color to a cell in a row if the previous cell is less and RED the cell is less than its previous:
Please check this video to illuminate what I want to describe:
https://www.loom.com/share/46470e78ae7b49699ce83d7c268dd459
Conditional formatting on row range in Google Sheets
The problem is that, as seen in the video and the screenshot, the conditional formatting cell references do not change when applied to a row, even if I did not use $. How can I manage to have relative references for each cell to its previous in a row?
For example, when setting GREEN color if the cell C1 is greater than B1 (IF =C1>B1 set the color GREEN), in the next cell D1 the conditional formatting should automatically be referencing: IF =D1>C1 set the color GREEN.
If you want to apply to the columns C and D, set your Apply to range to C:D.
Set 2 conditions with Custom formula is:
for the green styling: =AND(LEN(C:C),B:B<C:C)
for the red styling: =AND(LEN(C:C),B:B>C:C)
If you need to expand over more column, just expand the range.

Google Sheets Line Chart: adjust horizontal axis limits to exclude missing cells

I noticed that the horizontal axis fits X values even if the corresponding Y-values are missing.
Is there a way to automatically adjust horizontal axis limits to exclude missing cells?
https://docs.google.com/spreadsheets/d/1X3BhDyideX-7kyJ9Y-7xvV1naAwWd9eDPfPy3pP94Ic/edit?usp=sharing (sheet "Horizontal Axis Limits")
Thank you.
Use Data > Filter to hide blank rows. They will automatically be left out of the chart.
Alternatively, create a new data table that omits the blanks, like this:
=query(A1:B, "where B is not null", 1)
Then set the chart's data range to the new table.

Add border to Googlesheet based on nth row conditioning

I have a large spreadsheet, and so I have been adding a bottom boarder every 10th row, but not in conditioning. So every time I change the sheet, I have to redo the borders.
Is there a way to condition the sheet to recognise every 10th row (exluding the first due to headers) and then add a border?
Unfortunately (to the best of my knowledge) Google Sheets doesn't support cell borders in conditional formatting - the nearest you could get is a custom formula like this:
=mod(row()-1,10)=0
and then add a coloured border at rows 11,21,31 etc.
=and(mod(row()-1,10)=0,row()>1)
to exclude the headers row.

How to add more than 10 gridlines to chart

Is there a way to add more than 10 gridlines on a scatter plot chart in google sheets? I have more than 9 items on my horizontal axis and I would like a gridline for each item. Minor gridlines only put lines between the major lines.
Turns out limiting the horizontal axis to 10 was limiting how many actual gridlines were placed. I increased the horizontal axis value and the gridlines filled in as needed.

Rounding in Google Sheets to match a SUM value in a cell

I have a cell that returns a result that I need to split as percentages over 5 other cells that still need to add together to equal the original cell value. Rounding in sheets seems to make them add up wrong.
When I format the cell back to no decimal places - I want to show a whole number - they all round up and then total 24, but I need it to be the same as B1.
B1 is returned based on a formula so it will change depending on what is input into the other cells.
Google sheet

Resources