MacMost Q&A Forum • View All Forum QuestionsAsk a Question

How Do I Create If/Then Statements?

I have 2 columns – A and B. Column A will either be 11,12,13,14. Column B will either be 12,13,14,15. I want to have a formula in Column C that will result in a specific number (19,20,21,22,23,24) depending on the values in Column A and B.

A B. C
11. 12. 19
11. 13. 19
11. 14. 20
11. 15. 21
12. 12. 20
12. 13. 20
12. 14. 21
12. 15. 22
13. 12. 21
13. 13. 21
13. 14. 22
13. 15. 23
14. 12. 22
14. 13. 22
14. 14. 23
14. 15. 24
—–
Scott Levin

Comments: 2 Responses to “How Do I Create If/Then Statements?”

    11 months ago

    What you probably want to do is to use the Lookup function. See https://macmost.com/a-simple-numbers-lookup-example.html Watch that first.

    So you will create two tables. The first table has the lookup values, like 11 and 12 in the first two columns. Then column 3 will be the formula CONCATENATE(A1,”,”,A2) which will give you the text “11,12” in column 3. Then column 4 has the resulting value, like 19.

    In your other table, you have the left two columns for those two numbers, like 11 and 12. Then you have LOOKUP(CONCATENATE(A1,”,”,A2),Table 1::C,Table 1::D).

    So in that second table the 11 and 12 are turned into “11,12” which matches the “11,12” in table 1, and gives the result 19.

    scott levin
    11 months ago

    Thank you very much. I created the table.

Comments Closed.