Google Sheets: Insert Link Increases Font Size - google-sheets

In a financials spreadsheet I have to insert a lot of Links, and Sheets always increases the font size, eg from the default 10 to 12.
Also, when I paste a formula into a cell, both the font size and colour get changed.
Is there a setting to prevent this annoying behaviour?

after your paste you can press CTRL + A and CTRL + \
this will result in defaulting the formatting
or you can try CTRL + SHIFT + V
and the 3rd option would be to use mediate paste... copy and paste it somewhere where formatting is not supported like address bar, notepad (txt file), translate.google.com box... and then copypaste it into your sheet
there is also another option if your paste is only in one cell (not across cells). you either double click on the cell and then paste it or paste it right into formula bar/box instead of the cell

Related

How to represent a truly blank cell in google sheets which is also recognized when pressing ctrl + down?

I would like my if statement to give out a truly blank cell in case false so I can stop at the last non-blank cell when I press ctrl + down. I did Google it but still didn't work. It did pass the isblank() test but when I press ctrl + down, these cells also get skipped along with the non-blank cells and I end up at the last cell in the column. Here is the sample formula =if((A1>B1), "yes",). I've tried referencing a blank cell and that also passes the isblank() test but still is not recognized by ctrl + (direction). This is gonna be part of an Autohotkey script where I am basically gonna copy the resulting column by first selecting it with ctrl + shift + down. But as I mentioned, this takes me to the end of the column as Google sheets doesn't consider it fully blank or untouched. Even a workaround would also suffice. I just want to get those cells where the if statement was true in the clipboard. This is my time posting here so apologies if I broke any rules. Thanks!

Why does pasting(ctrl-v) sometimes break merged cells in google sheets

I am creating a PO form for my department. I have 2 cells merged with text wrap for the item description. If I copy a product name from Amazon and paste it into these merged cells, the merge breaks and text does not wrap. If I take the same text and paste into google search bar and then recopy the text and paste into the merged cells everything functions as normal. It does not appear to be the length of text but rather the font size that is the issue. Paste special- values only also fixes the problem but I am trying to make this form usable without special instructions. Does anyone have a work around or at least confirm font size can break a cell merge?
Font size is not relevant. You're copying a special character (likely a newline) at the end of the product name, which causes the merged cells to split.
There isn't anything you can do on your side to fix this, copy pasting formatted text directly from a webpage into your sheet will lead to things breaking.
A few options:
Double click on the merged cell, then paste the text into it
Select the merged cell and paste the values into the formula bar
Paste Special - Values
Answer:
I can confirm this does happen.
Workaround:
Instead of merging cells like this:
You can just use one cell and expand its width:
Fixing Font Size:
The only issue here is that if you paste in some text which is font size 18 and Times New Roman, if you don't use the Right Click > Paste Special > Paste values only then the text decoration will persist. You can fix this with a little script which changes the font to normal on edit:
function onEdit(e) {
e.range.setFontSize(10)
.setFontWeight("normal")
.setFontFamily("Arial")
.setFontColor("black")
}
This you will need to paste into the script editor for your sheet, by following the Tools > Script editor menu item. Once pasted, you will need to save the script with Ctrl+S. Anything pasted will now automatically be converted to Arial, size 10, black, normal weight font:

Google spreadsheet: Remove conditional formatting, but keep the format

Is there a way to remove the conditional formatting from cells, while keeping the applied format intact?
The only way I've found is:
Copy the cells.
Clear formatting on the cells (ctrl + \)
Paste special -> Paste format only (paste over the said cells).
Copy a cell that has no conditional formatting
Select the cells with de conditional formatting you want to delete
Click Edit > Paste special > Paste conditional formatting only.
Yes, to remove individual conditional formats while leaving other formatting unchanged, in Google Sheets:
If the conditional format pane on the far right is present, close it by clicking the X in the top right of the pane.
Highlight the range of cells (or select a single cell if you want to remove conditional format for only 1 cell) that have conditional formatting applied. For this to work, at least one of the cells you've highlighted must have conditional formatting defined.
Right click the highlighted cells and select "Conditional Formatting" from the context menu.
A vertical panel on the right will appear with a list of conditional format rules that are present in the highlighted range.
Hover the cursor (do not click -- just hover) over the rule you want to delete. As you hover a trash can icon will appear.
Click the trash can icon to remove that particular conditional format.
Copy the required range to another sheet and paste special, values only. Then immediately paste special again, formatting only.
If you want to keep the work in the same place on the same sheet, just cut instead of copy, and then do the above paste operations to the same place.
The advantage of the first method is that by creating a copy you can't accidentally mess up your original and can always replace this when you are satisfied with the result.
I know this is an old question, but I tried the approaches suggested. They don't work. The conditional formatting 'çonditions' are also copied across.
My Solution is to copy and paste into excel and then copy the values back into google sheets.
When pasting into excel the 'conditions' don't get copied over.
Some Redditor saved the day!
Here's the link
function clearFormatting () {
var s = SpreadsheetApp.getActiveSpreadsheet();
var ss = s.getActiveSheet();
ss.clearConditionalFormatRules();
}
To add to the most-voted answer, you can actually do this on an entire sheet, in case that's helpful. (Mac keys shown here)
Command-a to Select All
Command-c to Copy
Command-\ to Clear Formatting
Command-Option-v to Paste Format Only
Without a script is possible with a hack: copy into say Word and back again.

Function to add 3 rows together in OpenOffice Calc then drag function down for 195,000 rows

I have a spreadsheet with 195,000 rows, There are 3 columns with different numbers in in the 4th column (D1) I enter =A1+B1+C1 and it comes up with the answer, But I can only drag down the AutoSum feature slowly.
Is there a way to automate it so I can have the Autosum for all columns in D so it'd be D1 : D195000?
Here is a simple trick you can do: Write your type on the first cell (D1) and anything to the last one (D198K - use the Navigator tool (F5) to go there fast). Then, copy the cell from the first cell, and press Ctrl + Shift + End (selection till the last cell that contains data) and then make a Paste.
This should paste the type to the selected shells, applying the type in analogy to each cell - unless you have used $ in the type for a cell row and/or column, in order to preserve a cell.
You could simply follow this logic in order to create your own function in OpenOffice Calc.

Apply formula to the entire column

I'm changing all the zip codes from Column A into Column B with the formula:
=TEXT(A1,"00000")
Like this:
I want every cell in Column B to be transformed using the formula above. But I have over 40,000 rows, so it is not feasible to drag the formula down to apply it to the entire Column B because it takes so long.
Are there any alternatives to dragging?
It looks like some of the other answers have become outdated, but for me this worked:
Click on the cell with the text/formula to copy
Shift+Click on the last cell to copy to
Ctrl + Enter (Cmd + Enter on Mac.)
(Note that this replaces text if the destination cells aren't empty)
I think it's a more recent feature, but...
Double clicking the square on the bottom right of the highlighted cell copies the formula of the highlighted cell.
I think you are in luck. Please try entering in B1:
=text(A1:A,"00000")
(very similar!) but before hitting Enter hit Ctrl+Shift+Enter.
This is a shortcut for wrapping the formula with ArrayFormula():
=ArrayFormula(text(A1:A,"00000"))
This worked for me:
Input the formula in the first cell.
Press Enter.
Click on the first cell and press Ctrl + Shift + down_arrow. This will select the last cell in the column used on the worksheet.
Ctrl + D. This will fill copy the formula in the remaining cells.
This is for those who want to overwrite the column cells quickly (without cutting and copying). This is the same as double-clicking the cell box but unlike double-clicking, it still works after the first try.
Select the column cell you would like to copy downwards
Press Ctrl+Shift+⇓ to select the cells below
Press Ctrl+Enter to copy the contents of the first cell into the cells below
BONUS:
The shortcut for going to the bottom-most content (to double-check the copy) is Ctrl+⇓. To go back up you can use Ctrl+⇑ but if your top rows are frozen you'll also have to press Enter a few times.
For Mac:
Click on the first cell having the formula and press Ctrl + Shift + down_arrow. This will select the last cell in the column used on the worksheet.
Command + D
(don't use ctrl). This will fill the formula in the remaining cells.
Let's say you want to substitute something in an array of string and you don't want to perform the copy-paste on your entire sheet.
Let's take this as an example:
String array in column "A": {apple, banana, orange, ..., avocado}
You want to substitute the char of "a" to "x" to have: {xpple, bxnxnx,
orxnge, ..., xvocado}
To apply this formula on the entire column (array) in a clean an elegant way, you can do:
=ARRAYFORMULA(SUBSTITUE(A:A, "a", "x"))
It works for 2D-arrays as well, let's say:
=ARRAYFORMULA(SUBSTITUE(A2:D83, "a", "x"))
Found another solution:
Apply the formula to the first 3 or 4 cells of the column
Ctrl + C the formula in one of the last rows (if you copy the first line it won't work)
Click on the column header to select the whole column
Press Ctrl + V to paste it in all cells bellow
Just so I don't lose my answer that works:
Select the cell to copy
Select the final cell in the column
Press CTRL+D
You can use Ctrl+Shift+Down+D to add the formula to every cell in the column as well.
Simply click/highlight the cell with the equation/formula you want to copy and then hold down Ctrl+Shift+Down+D and your formula will be added to each cell.
The exact formula is:
=ArrayFormula(text(A1:A,"00000"))
ArrayFormula works on multiple rows (in the above example, every row), and results are placed in the cell with the formula and the cells below it in the same column. It looks as if the same formula was copied into all those rows.
If any of the cells in that column are not empty, they won't get overwritten. Instead, you will get an error message.
To save yourself typing, you can use the trick from the answer above by pnuts:
Type: =text(A1:A,"00000") and then hit the following key combination:
On windows: Ctrl+Shift+Enter
On a MAC: Command+Shift+Enter
This will convert the formula to ArrayFormula.
After hitting the key combination, you need to hit Enter, to actually apply the converted formula.
If your sheet contains header row(s), and you want to apply formula from (for example) row 5 on, you would use =text(A5:A,"00000") instead.
This answer includes information from pnuts's answer and LOAS's comment.
Lambda Solution
Using the new LAMBDA and MAP functions, this is now doable without an ArrayFormula or having to drag anything.
=MAP(A2:A6, LAMBDA(value, TEXT(value, "00000")))
LAMBDA defines a function. value is the parameter, which we can use in the formula expression.
MAP applies the LAMBDA to each value in the given range. This also works on 2D ranges.
To be clear when you us the drag indicator it will only copy the cell values down the column whilst there is a value in the adjacent cell in a given row.
As soon as the drag operation sees an adjacent cell that is blank it will stop copying the formula down.
.e.g
1,a,b
2,a
3,
4,a
If the above is a spreadsheet then using the double click drag indicator on the 'b' cell will fill row 2 but not row three or four.
Well, Another easiest and simplest way is as in my file rows were above 16000, which is pretty huge number. So steps which helped me are:
1. Select the cell in which formula is written.
2. Then go to NameBox(it is the box which tells about active cell). Here in my case it was the cell where was formula was written(i.e P2).
3. Then in that cell type your active cell number:your last row.For example last row of my column was 16745 and formula was written in P2.
So write P2:P16745,
4. Press Enter in Name Box and bingo your whole area of column till last row is selected.
5. Now press Ctrl+D(Windows)
try:
=INDEX(TEXT(A2:A; "00000"))
advantages: short, works, smells nice
to map out empty cells you can do:
=INDEX(IF(A2:A="";;TEXT(A2:A; "00000")))
Reading the answers here did not quite work for me, but a combination did. Here are my steps (Windows, Chrome):
Select the cell with the formula you want to apply to the column (for the whole column, ensure this is the top cell)
Ctrl + Shift + Down (selects all below cells)
Ctrl + D (apply formula)
Done!
Based on:
https://stackoverflow.com/a/61112723/3200858
https://stackoverflow.com/a/51411774/3200858
You may fill the column by double-clicking on the bottom right hand corner of the cell which you want to copy from (the point on the box that you would otherwise drag) and it will be applied to whole column.
NB: This doesn't work if you have the filter applied, nor if there is already something already in the cells below.

Resources