Let's make this straight.
I'm typing, and after leaving the cells there should be a text that will add at the beginning of whatever I typed.
is that possible? if so, then how?
I know about the CONCATENATE function but it wasn't my bet because deleting the data on a cells will also delete the function.
3 Answers
Natively, Excel does not support this.
It is usually done by creating 2 cells. One is the cell that you input text, the other is the cell with the outcome.
For example:
Cell A1 has the outcome, and Cell B1 has the input. Cell A1 will prepend the text "Answer: " to whatever is typed in cell B1, but only if Cell B1 contains text. The formula in Cell A1 would be:
=IF(B1="";"";CONCATENATE("Answer: ";B1))If you really want to just use one cell, you will be required to use VBA macro's to add the after a cell changed. Do note, that if you go this route, you will also take into account that if a user edits a cell again, the added text is now in the cell too, and upon submitting, it is added again. So the macro has to see if the text was in there to begin with, and skip adding it a second time.
Usually it easier to create a small button near that cell that pops up an input field and calculate what the outcome would be based on that input.
That said, VBA scripting is very advanced, and unless you actually can provide code of your own, is considered off-topic here on SuperUser.
3Select all cells to affect, then choose 'format cells' from context menu.
In the 'numbers' tab choose 'user defined' and type '"My Text "@' into the definition field.
In case you want to type numbers you have to replace the @ with the number format you want to use. (e.g.: '"My Text "0' for rounded integers.)
You can also combine both formats: '"My Text "0;;;"My Text "@'
I'm not so sure if this will answer your question, but I just use the custom formatting in Excel. E.g. I want to see #001234 on the cell without having to type #00 in every single cell. So I just go to
numbers tab > custom format > create a custom format
and for my case I just created "#00"0 where the text inside the quotation marks define what is automatically added after I type in every cell.