Enter data from one or other column (A or B) depending on value in C

  • I've been searching for an Excel formula to do this but suspect only VBA will do it. Can anyone help me please?

    I have columns ABCD.
    A and B contain data
    C contains numbers 0-9 - randomly - sometimes there will be duplicates
    Enter data into D from A until number in C=4 (trigger value)
    AFTER this point, begin inserting data from B
    When data in C=5 (trigger value), AFTER this point, begin inserting data from A again.
    Example follows. NB Data between trigger values will continue to be taken from either A or B until the next trigger.
    Many thanks.

    A AA 7 A
    B BB 2 B
    C CC 5 C
    D DD 5 D
    E EE 6 E
    F FF 5 F
    G GG 4 G
    H HH 4 HH
    I II 3 II
    J JJ 2 JJ
    K KK 6 KK
    L LL 2 LL
    M MM 3 MM
    N NN 3 NN
    O OO 4 OO
    P PP 5 PP
    Q QQ 5 Q
    R RR 5 R
    S SS 4 S
    T TT 7 TT
    U UU 6 UU
    V VV 5 VV
    W WW 4 W
    X XX 3 X

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!