0

I need to be able to move data from a group of columns (A,B,C) based on there being data in a fourth column (D) to a new group of columns (E,F,G).

A    B    C    D    E    F    G

20   0    0    15   15   0    0
0    10   0    5    0    5    0
0    0    90   90   0    0    90
0    0    0    0    0    0    0

When columns A, B and C are reported to have data and column D has data transfer the data from D to a corresponding column for A, B and C to be represented in columns E, F and G.

1
  • You said "move data" and "transfer the data". Does this mean you want columns A, B & C values to be cleared after the data is transferred to E, F & G? Or do the original values stay? This will make a big difference how the question is answered.
    – CharlieRB
    Jan 11, 2013 at 12:53

2 Answers 2

0

An if statement might work.

in column E: =if($D1=requiredvalue,$A1,0)

You didn't mention what the required value was to find in column D. If you mean a value above zero use $D1>0. If you mean one particular value use what I mentioned above.

0

If I understood your question correctly, use the following formula:

  • E: =IF(AND($D1 > 0; $A1 > 0); $D1; 0)
  • F: =IF(AND($D1 > 0; $B1 > 0); $D1; 0)
  • G: =IF(AND($D1 > 0; $C1 > 0); $D1; 0)

Expand the formula from the first row to rows below.

The third argument to IF is the value of the cell in case where the condition is false. It could be any number or the value of a cell, for example $A1.

1
  • 1
    Well, you can simplify that a little, to E1 = =IF($A1>0, $D1, 0). And, if you leave out the first $ and say =IF(A1>0, $D1, 0), you can just drag it out to columns F and G. Jan 11, 2013 at 21:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .