how to split one column into two columns base on conditions in EXCEL

前端 未结 2 1450
青春惊慌失措
青春惊慌失措 2020-12-07 06:07

I am very new to Excel. Please help

Column1
A,1
B,2
C,1
D,2
E,1

output:

Column2  Column3
A,1       B,2
C,1       D,2
E,1


        
相关标签:
2条回答
  • 2020-12-07 06:50

    Assuming your data ("A,1, etc.") spans cells A1:A50, then:

    Cell B1: =INDEX($A$1:$A$50,ROW()*2-1,1)

    Cell C1: =INDEX($A$1:$A$50,ROW()*2,1)

    Then you can copy the formulas to cells below, as far as needed. These formulas "redistribute" your cells contents between the two columns, regardless of the text itself.

    0 讨论(0)
  • 2020-12-07 07:03

    You can use an IF condition like this as well

        =IF(RIGHT(A2,1)="1",A2,"") in column 2
    =IF(RIGHT(A2,1)="2",A2,"") in column 3
    

    However cells cannot be deleted just with formula

    0 讨论(0)
提交回复
热议问题