简体   繁体   中英

Excel how do i check a cell in excel, if it's empty then shift the contents of the previous cell to current cell

I have some data like this

I need to move the thirdname field into lastname if the lastname cell is empty. If there is content already in lastname cell, it should skip that cell and move to the next cell

i tried this "=IF(ISBLANK(lastnamecell),thirdnamecell,lastnamecell)" but it's not correctly copying the contents from thirdname to lastname.

Simply set last name =ThirdName. And overwrite it with last name if necessary.

+ B         | C 
| ThirdName | LastName
| Abc       | ==IF(ISBLANK(B2), "", B2)
| Def       | No problem

Or another option is: create another column to type lastname, apply your formula and hide the real lastname column.

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