Google 工作表:交换列值(如果存在)

Google sheets: swap column value if present

如何在 Google 工作表中编写一个公式来交换 Column 1Column 2 之间的值,前提是 Column 2 中有一个值?

    1    |    2
-------------------
    V    |
    S    |    T    

我想要交换第二行,而不是第一行。有帮助吗?

事实证明这很容易。这是第一列的公式:

=if(B2, B2, A2)