How can I add multiple formulas to a long text cell? - google-sheets

I have a cell in a Google Sheets doc that is the template HTML for an e-commerce webpage. It's very long as there's lots of content on the webpage, and of course, the whole cell is a text format because HTML is text. I want to be able to have that HTML text look up other cells in the spreadsheet to populate parts of the HTML with values I have typed in other cells. So if my HTML is in cell A1 and in one part of it it says =B1 (or whatever you end up telling me) I want to be able to type Apple in cell B1 and have the HTML text replace =B1 with apple. Is there some way that, within a text format cell you can signify to Sheets "this next bit is a formula"? Basically, what should I type instead of the =B1 I used above to make this lookup work? Remember this is all in a text cell.
I've tried various ways of doing this but all seem to rely on having the cell in formula format, but this is not possible as I need to do this lookup process many times in a single cell with a large amount of text in it.

It looks that are asking about how formulas work in Google Sheets, specifically how formulas handle text values.
In Google Sheets, a formula start with = or +. As you question is about text values, the you should use =.
After the = your could add a quote enclosed text like ="apple". If your text include quotation marks, then you should escape them. Let say that your text is "apple" then the formula to use is ="""apple""".
Let's do a jump.
The concatenation operator is &. Let say that you have ="""apple"" ""orange""" on one cell, and grape in cell A1. To put a reference to A1 in order to insert it's value between the quoted fruits, the formula to be used is ="""apple""" & A1 & """orange""".

Related

Conditional Formatting a Range based on Text from Range on separate Sheet in Google Sheets

Populating a dynamic event calendar from a separate sheet and want the titles of each event to be bold font.
Conditional formatting works if I am comparing to a single string or cell with text, but there are multiple titles that would appear in each column.
Need to use "Text is exactly" or a custom formula, where if any of the cells in column D for example match any of the titles from column E of another sheet, make them bold.
A separate sheet can only be accessed via the "INDIRECT" function, but even when I pull the list of titles onto the same sheet, it does not work.
Have tried the built in "Text is exactly", also tried custom formulas using TEXT, EXACT, IF, etc. but can't seem to get it to work.
Tried custom formula:
=$E$8:$E$52=TEXT($E$55,$E$56) This only matches the first instance (E8 to E55)
Format range E8:E52 with this conditional formatting custom formula rule:
=match(E8, E$55:E$56, 0)
To get the titles from the other sheet, use something like this:
=match(E8, indirect("Sheet2!A2:A"), 0)

Conditional format based on position of character within a word - Google Sheets

I wanted to determine if it's possible to use conditional formatting on specific characters in a word and their position within the word? For example, when marking a spelling test. If a student spells the word 'bed', can I format a cell showing the 'b' is in the correct position? Below is an example of what I'm trying to do (ie. tick the boxes if the letters are in the correct position):
no, this is not possible in google sheets within the scope of conditional formatting. only whole cell can be conditionally formatted when compared against something

Google Spreadsheet - How to split delimited text into columns without format conversions (i.e. preserve raw text)

Say...
cell 1 contains this text: 03400561, 1995-12-31
I need a way to split this cell into 2 raw text columns". i.e.
My expected/wanted output: cell 2 = 03400561 (as text) and cell 3 = 1995-12-31 (as text)
If I use the split function to do this (e.g. cell 2 = split(cell1,",")), it removes leading zero, and convert the yyyy-mm-dd text into a google date. I do not wish to have this conversion to take place. i.e. I just wanted straight and simple split a text, into columns of text (not numbers. not dates).
How do I do this out of the box? (I've tried google around but no luck). Is this even possible?
Side note: the "Data" => "Split text into columns" approach - no luck. It converts all numeric-like texts into numbers, and date-like texts into dates. I wish to have raw text throughout and no conversion like this to happen. How to do this?
Ugly as hell, but seems to work on your example. Basically enclose the separator with double quotation marks to force sheets into interpreting the data as text. Then remove them and use arrayformula() to cover all the columns:
=arrayformula(substitute(SPLIT(char(34)&substitute(U19,",",char(34)&","&char(34))&char(34),",",true,false),char(34),""))
CHAR(34) evaluates to double quotation (i.e. ") to signify text entry. Just be aware that the second variable includes a leading space (' 1995-12-31')

Conditional formatting won't work if the content of the cell is a formula

I've applied a custom formula conditional formatting that highlights the cell in column C if it matches with column K.
The formula I used is =MATCH(C3,$K$3:$K$988,0). However, it does not highlight if the content of the cell is a formula (the formula on the cell is =if(isblank(A47),"",C46+1)).here is a screenshot of the sheet with the formula
.
I tried typing the number manually, and it works, but won't work if it is a formula. If I type it manually, the format should be PLAIN TEXT so the conditional formatting will work. I tried to put in it AUTOMATIC, it does not work. Here is a screenshot of the sheet if I type the number manually
.
I'm not sure why this is happening because it works well in other sheets with the same formula. Please help me. Thank you!
Adding one to C46 produces a number. If the values in column K are formatted as text it won't match with them. If you want to keep the numbers in column K formatted as text, you need to convert the number you're looking up to text before doing the lookup. You can use
MATCH(text(C3,"#"),$K$3:$K$988,0)
or just
MATCH(C3&"",$K$3:$K$988,0)

Conditional Formatting cells in column up to and including the last one with text entered

I am using Google Sheets and trying to write a custom formatting rule that seems like it should be simple. I am trying to figure out how to conditionally format all the cells in a column INCLUDING AND ABOVE (but not below) the cell that meets my condition.
I've found a lot of things that will format the entire column, but that's not what I'm looking for.
The image below is a basic example that I manually colored in to do what I want.
It's for my budget spreadsheet, where each row is an entry from a particular date. I have an "Agreement" column that is empty except when I enter the date that I reconciled the budget. I want it to color that cell and all the empty cells above it green, signifying at a glance: "everything up to this point is ok/has been checked over". Then as time goes by, and I enter another date several rows below, I want it to extend the colored shading up to there.
I've been searching, but it is hard to articulate this; if I say "until this cell" I get results for "shade cell until text is entered"; any mention of "above" and "below" generally relates to the values in the cells; I've found some things about Indirect but just for a single cell above, not for all cells above the current cell.
Wondering if this is even possible...
Google Sheets example
If you create a conditional formatting rule for column A using a Custom Formula you can use this formula:
=COUNTIF(ROW(),"<="&LARGE(ArrayFormula(IF(ISBLANK(A1:A100),"TRUE",ROW(A1:A100))),1))
The larger the ranges you use, the slower it will be however.

Resources