Newline and whitespace inside function bar being removed in Google Sheets - google-sheets

I have a very long formula that is near impossible to read and would like to add newlines and tabs to it so the next person who has to change it, doesn't have to spend forever trying to read it.
Ive already given up on using tab but after I stop editing the formula it removes basically of the formatting including the newlines. Is there anyway to stop this from happening?

I Figured it out. I wont use my formatting but after a few changes it formatted it.
This isnt allowed
This is allowed

Google Sheets formula bar doesn't save changes when only a break line is inserted. In order to keep the change, add something else like
=A1+B1
+0
Then remove the +0

Related

Google Sheets - copying CONCATENATE'd text deletes line breaks (comes out as massive block)

Issue with Google Sheets:
I have the CONCATENATE function combining text from several cells into 1 "copypastable" block.
I'm inserting line breaks using CHAR(10).
So it looks fine in Google Sheets itself, and functions perfectly when copied to other Google apps.
But copying it out to other programs (CorelDRAW, Illustrator, or AutoCAD) causes 2 issues:
1.) Adds unwanted double quotes around the entire text.
2.) Destroys all line breaks.
So I have to manually edit every text block, to delete the quotes and add line breaks.
Huge waste of time. How can I make it work properly?
Interestingly enough, it works more properly in Notepad:
Still adds the double quotes, but at least the line breaks work.
But having to copy/paste everything into Notepad, deleting the double-quotes, and then copy/pasting it into Corel/Illustrator/AutoCAD - STILL has the issue with the deleted line breaks.
Depending on the program you're bringing this into, you might want to try using CHAR(13) instead of CHAR(10).
CHAR(13) is a carriage return, while CHAR(10) is a linefeed which will not "show" in google sheets, but when you copy/paste it to a different program depending on the interpretation of those characters it should show up as a separate line.
this is a known issue and one way how to counter it is to copy the content of fx bar (or active cell) instead of the cell itself. you may also want to move down the output to not catch the formula itself. try:
={""; CONCATENATE(...)}
where ... is your formula

Trying to Add Double Quotes Before and After the String Created by formula

I am working on Google Sheets since couple of years and found i very useful but now there is one situation i got faced and make me troubled to fix it.
In the current stage, when the line break is included in the cell value, when the cell is copied and pasted, it seems that it becomes """test""". In that case, when i want to copy and paste the cell values like "test" instead of """test""",
And there are some situations where i have added IF condition in formula which results comes sometimes in Line Break or sometimes in single line.
=CHAR(34)&SUBSTITUTE(A1,",",CHAR(10))&CHAR(34)
This formula works for Single Line string but when it comes to Line Break it adds more qoutation like"""test"""
I only want the solution like this even if its single line or Multiple line breaks always result should be "test".
your help will be much appreciated.
this is a known issue and one way how to counter it is to copy the content of fx bar (or active cell) instead of the cell itself. you may also want to move down the output to not catch the formula itself. try:
={""; CHAR(34)&SUBSTITUTE(A1,",",CHAR(10))&CHAR(34)}
This formula should output the expected value, even with several line returns and several " characters.
=CHAR(34)&SUBSTITUTE(A1,"""","")&CHAR(34)

Replace user created blanks with 0's

I made a binary calculator with bitwise functions (bitand, bitor, bitxor, ect.) in google sheets (yes I am aware that there are built in functions to do this, this seemed more fun). It is an 8 bit calculator, and I currently have addition and subtraction implemented. Multiplication is planned, but seems way too hard at the moment
One of the things I came across is once a calculation is done, the user has to manually 0 out the addends/minuend and subtrahend one digit at a time. I would like to optimize this process.
I can easily create a script that will input 0 into all the cells and hook that up to a button. I have a feeling that's the route I'm going to have to go. But I want to challenge myself in making cool stuff, so I want the coolest solution.
My question is: is there a way I can do this without a script attached? I've been experimenting with ARRAYFORMULA and VLOOKUP, but I don't have a clear answer yet.
Expected behavior:
User inputs their calculation. User records the answer. User selects both 8 bit binary numbers (currently residing in A1:H2) and presses backspace. Google Sheet automatically translates those blank cells to 0's.
take a look into custom internal formatting. any text can be converted to "0"
then see shifted arrays:
={"", "x"}
formula from G9 will print "0" into H9. also, you can anytime enter value in H9 to "overwrite" the zero and after you don't need the entered value you just clear it with backspace or delete key and it will be filled with "0" again.
also, note that after you enter value in H9, G9 will error out and such error cant be suppressed so see hidden cells:
not sure if it's cool enough but it works (with compromises)

Google Sheets Conditional Formatting not right sometimes

I am trying to create a google sheet to track some payments and have created some conditional formatting rules to show when there is under/over/correct payments. It seems to work correctly, except for one set. I am linking to a spreadsheet so hopefully you can view it.
https://docs.google.com/spreadsheets/d/1IJ6zFXP2cMRQmbf3KSFEcO_H36CP3sBwp1dfvJMSDmc/edit?usp=sharing
It seems to go wrong on one particular set...line 19 shows that 26 cents is still owed - it shows correct. If you then look at line 14 (it works upwards), the Still Owed shows as $0.00 and not $ - and it shows in red and not white. And from then and upward, even though nothing is owed, it doesn't show right. However, I tried on line 15 making it show a penny is owed, and then line 10, it was paid off and so is $0 owed and it shows right.
I've tried copying the formatting and checking all the columns and I think they all look the same.
Any ideas how to fix it?
You should use Custom formula in Conditional Formatting.
Note: Use VALUE() in Format rules helps you to shorten the content Apply to range, because that ignores text cells
I think it's a (lack of rounding up/down) issue.
I changed the formula in S14 from:
=SUM(F14-G14+K14-L14+P14-Q14)
to:
=round(SUM(F14-G14+K14-L14+P14-Q14),2)
This way it will disregard any decimals beyond the second and thus make $ 0,00 truly 0.

Number/Word Splicer for Google Spreadsheets

I am trying to make a google spreadsheet that splits a word or string of numbers in half and puts the back half in front of the first half in a new column. However, I am new to this who process and so I came here to ask for help. I originally tried macros but couldn't get them to copy and paste information from columns.
Here is the basic idea:
The spreadsheet cuts the number or word in half putting the back in front.
Thanks for everyone's time.
In case of an odd number of chars, ROUNDUP must be used in RIGHT or LEFT function:
=ArrayFormula(RIGHT(A1:A,ROUNDUP(LEN(A1:A)/2)) & left(A1:A,LEN(A1:A)/2))
I think your problem shall be solved using the following code:
=CONCATENATE(right(A2,len(A2)/2),LEFT(A2,len(A2)/2))

Resources