简体   繁体   中英

Fill in blank Excel cells using value from another column?

Similar to Fill non-contiguous blank cells with the value from the cell above the first blank but using an adjacent column instead.

I have something like this:

在此处输入图片说明

For all the blank values in column A, I would like it to be populated with the matching value from column C. So A2 would be populated with C2 and A4 with C4.

Make a new column. In Cell B2, write the formula =IF(A2<>"",B2, D2) . This will set A2 to be equal to the old value if there was an old value, or the corresponding value in column C (which was moved to D when you inserted a new column) if it was missing a value. Drag this formula down. Then, copy the column, paste > paste special > values only, and keep your new column. Then, delete the old one.

In a new column D, you can use the formula =IF(ISBLANK(A4), C4, A4) and that would output:

A   B   C   D
-------------
X   Y   Y   X
    G   R   R
e   9   T   e
    K   7   7

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