Questions

Excel Formula

+
0 Votes
Locked

Excel Formula

fields098
I have a spreadsheet that has a column with specific locations. What I want to do is create a formula that will look at that column and return the cell information only if it matches what I am looking for. In other words, if the column had 1,2,3,4 in individual cells, and I am looking for cells that have 4 in them, then I want it to return a 4 on the same row that the 4 was found. Does that make sense? Example:

a b c d e f <-(result column)
1 X X X 7 X
2 X X X 5 X
3 X X X 2 X
4 X X X 4 X 4
5 X X X 2 X
6 X X X 4 X 4

Thanks
  • +
    0 Votes
    cm091961

    Table
    A B C D E
    1 O 7 0
    2 0 5 0
    3 0 2 0
    4 0 0 4
    5 0 2 0
    6 0 4 0

    In Column E for each row calculated, enter the following formula:

    =IF(A1=4,4,0)+IF(B1=4,4,0)+IF(C1=4,4,0)+IF(D1=4,4,0)

    You only need to enter the formula in cell E1
    then copy and paste it to the other cells in
    column E that need it.

    The result in this case is in column E, any
    cell that has the formula will display a 4 if
    A, B, C or D = 4 and will display 0 if none
    of A, B, C or D =4. If all cells in column E had the formula, the results would be:

    A B C D E
    1 O 7 0 0
    2 0 5 0 0
    3 0 2 0 0
    4 0 0 4 4
    5 0 2 0 0
    6 0 4 0 4

    Hope This Helps,

    CM91961

  • +
    0 Votes
    cm091961

    Table
    A B C D E
    1 O 7 0
    2 0 5 0
    3 0 2 0
    4 0 0 4
    5 0 2 0
    6 0 4 0

    In Column E for each row calculated, enter the following formula:

    =IF(A1=4,4,0)+IF(B1=4,4,0)+IF(C1=4,4,0)+IF(D1=4,4,0)

    You only need to enter the formula in cell E1
    then copy and paste it to the other cells in
    column E that need it.

    The result in this case is in column E, any
    cell that has the formula will display a 4 if
    A, B, C or D = 4 and will display 0 if none
    of A, B, C or D =4. If all cells in column E had the formula, the results would be:

    A B C D E
    1 O 7 0 0
    2 0 5 0 0
    3 0 2 0 0
    4 0 0 4 4
    5 0 2 0 0
    6 0 4 0 4

    Hope This Helps,

    CM91961