Here’s how to conditionally show the address using templates and an if-then-else column. You can see that I have the data split up into different fields for address, address 2, city, state and zip.
First create a template column that joins Address and Address 2. You will need 2 spaces and the Enter key to get the Address 2 on a new line.
Next create an If-Then-Else column that will either show just Address or Address and Address 2 if Address 2 is not empty.
Next create another template column that joins the Address If-Then column to the City, State and zip. Again you will need 2 spaces before pressing Enter to create a new line.
Here is what the address looks like in a Rich Text component with Address 2 left empty.
Here it is with Address 2 filled.
It does get a little wonky if you start a line with the # symbol. I’m guessing this has to do with the # being a markdown symbol, so for whatever reason it creates an extra space.
Templates are the way to go here, but since you mentioned in your first post that you were wondering about copying formulas in the sheet, I would suggest looking into arrayformulas. They are handy if you need to use the same formula on all rows because you don’t have to drag the formula down. Also, new rows will automatically have the formula applied. You don’t need them for this situation, but in the future you may run into a situation where you need a formula on all rows that’s too advanced for Glide. It’s a good tool to know about if you ever need it. Just know that when using arrayformulas, all rows are considered filled and any new data coming from the app will be pushed to the very bottom of the sheet. In that case you will need to delete all empty rows to prevent issues. @George_B has a nice little writeup if you ever need to refer to it.