简体   繁体   中英

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

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.

在此处输入图像描述

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

Is this what you need?

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

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM