Home > Net >  How to make a cell only show result after input data in cell
How to make a cell only show result after input data in cell

Time:01-31

I have a software that when copying it copies the whole string with the code for phone number ex “3 mobile 0760916474. Then I have a callback number ex “*124949446”. For now I have two formulas that takes the input number and copies the last 9 and then adds the callback number. One of them is “="*124949446"&RIGHT(A25,9)” and the other one is “=CONCAT(Sheet2!A2,RIGHT(A1,9))”. Both of the work good but they both display the callback “*124949446” even when there is no input from the input cell (phone number). I was wondering if it is possible to make it more clean and neat.

This is what I was thinking. There is a cell (input cell) where you past the clipboard "3 mobile 0760916474" and that this cell will only copy the last 9. Then there is the show result cell which will display the whole string (output) "*124949446760916474". So the output cell will be blank until the input cell has something in it. Is this possible to do it with a formula or a script?

I will provide some pictures, becuase I can't share the document.

enter image description here

Have tride with formulas but can't figure it out. Not so good at scripting so wondering if maybe a script could sovle this

CodePudding user response:

Is this what you need?

=IF(B1="","","*124949446"&RIGHT(B1,9))

enter image description here

  • Related