SOLVED

# Mutiple formulas in 1 cell

Occasional Contributor

# Mutiple formulas in 1 cell

how do you write mutilple formulas for 1 cell. example (in one cell if the number is 5 then i want it to input in another cell the number 1 OR if the number in that same cell is 4 then i want it to input in another cell the number 2 and so on.

15 Replies

# Re: Mutiple formulas in 1 cell

@Budwizer_10 A cell can only hold one formula, but it can have many different outcomes. On the other hand, multiple formulae can reference one particular cell.

If you could upload a schedule that gives a clear example of what you are dealing with, that would be helpful.

# Re: Mutiple formulas in 1 cell

Spreadsheets provide a functional, rather than imperative, programming style.  That means they are specifically designed to prevent a value/cell being changed as a result of executing one or more instructions held elsewhere.

Rather than looking at the value in a cell and thinking "What do I want to happen as a result of this?", focus on the other cells and ask "How do I determine the value of this cell"

# Re: Mutiple formulas in 1 cell

Hi there, thanks so much for the response. Here is a copy of what i am trying to do.
This table is for a golf game and basically on hole 1 if par is a 4 and Greg scores a 6 he should get 0 points, if he scores a 5 he should get 1 point and he scores a 4 then 2 points and if he scores a 3 then gets 3 points. I am trying to input the mutiple what if formula into where the Points total (1) is and retreive the data from where Greg inputs his score (5)
Hole 1 Hole 2 Hole 3 .........etc
Par 4 5 3
Greg 5 4 4
Points 1
Not sure if this is possible but any further help would be very much appreciated.

# Re: Mutiple formulas in 1 cell

Hi there, thanks so much for the response. Here is a copy of what i am trying to do.
This table is for a golf game and basically on hole 1 if par is a 4 and Greg scores a 6 he should get 0 points, if he scores a 5 he should get 1 point and he scores a 4 then 2 points and if he scores a 3 then gets 3 points. I am trying to input the mutiple what if formula into where the Points total (1) is and retreive the data from where Greg inputs his score (5)
Hole 1 Hole 2 Hole 3 .........etc
Par 4 5 3
Greg 5 4 4
Points 1
Not sure if this is possible but any further help would be very much appreciated.

# Re: Mutiple formulas in 1 cell

@Budwizer_10 No problem. See attached workbook for a working example based on your description. But I suspect that your next question will be to include course rating, multiple players, stroke index, handicap and playing handicap.

In the attached file you'll find two solution. One with new Excel functions and one with an "old-style" approach.

# Re: Mutiple formulas in 1 cell

I liked the 365 solution!  Since you have the situation under control, I set out to play with Lambda functions.  I think it may be a while before I really get settled into the new ways of working and read the formulas fluently; they still don't look like spreadsheets to me.

# Re: Mutiple formulas in 1 cell

Riny/van/Eekelen, thank you so much this is what i was looking for and it now makes sense, what you are saying. Excel is unable to create a mutiple formula in one cell so you have to create a data table to draw from for all the what ifs. Again thank you so much. Greg

# Re: Mutiple formulas in 1 cell

Peter, I want to thank you also this gives me a better understanding of what i was looking for and it now makes sense, what you are saying. Excel is unable to create a mutiple formula in one cell so you have to create a data table to draw from for all the what ifs. Again thank you so much. Greg

# Re: Mutiple formulas in 1 cell

One last question, Your spreadsheet works perfect but when I try to copy paste the scores and points values for all of 1 player to create another player the formulas do not work any longer. Am i missing something in the copying and pasting?

# Re: Mutiple formulas in 1 cell

Hi there, either yours or Peters i could not seem to copy paste to create another player. I am not sure how to upload a copy of mine otherwise i would. Where do i upload a copy. thx

# Re: Mutiple formulas in 1 cell

@Budwizer_10 Below the box where you answer, you should see this: