Ready, steady… save!
You don’t need a chart to join in. Here are 2 ways to record your savings:
1. Cross it off
Pop a chart into your first post. Saved an amount? Cross it out! Read more »
£0.01 £0.02 £0.03
2. Write it down
Skip the chart and add updates to your first post. Read more »
“Another +£3 saved today. Go me!”
Use +£ before each new saving so it counts towards your total.
📨 Have you signed up to the Forum's new Email Digest yet? Get a selection of trending threads sent straight to your inbox daily, weekly or monthly!
Any Google Sheets wizards that can help?
firsttimebuyer2013
Posts: 159 Forumite
Basically, I'm trying to get a sheet to do a sum, depending on what the drop down menu says.

The drop down menu will have about 4 options. The first one, if 'Cost' is selected, has to be C2-B2 witht the result in D2.
The second, with 'Profit', or two other choices under the dropdown (for example bonus, gift), just need to be whatever the value of C3 is to appear in D3.
Is this possible at all?
Thank you

The drop down menu will have about 4 options. The first one, if 'Cost' is selected, has to be C2-B2 witht the result in D2.
The second, with 'Profit', or two other choices under the dropdown (for example bonus, gift), just need to be whatever the value of C3 is to appear in D3.
Is this possible at all?
Thank you
0
Comments
-
Simplest way is to use the IF function
http://spreadsheets.about.com/od/otherspreadsheets/qt/090808-google-spreadsheet-if-function.htm0 -
I had a look at that sheet but I'm still none the wiser. Can anyone help?0
-
firsttimebuyer2013, the above link, look at row 5 in the example instead of "Yes", replace with "Cost", then do your sums
looks like you will need the OR function too to
A gift is a loss, so it is -1*C3 to appear in D3 ???0 -
I'm not going to second guess what the correct calculations should be.
If I've read the OP right then the calculation is that if the dropdown says 'Cost' it should be one calculation, and if it says anything else it should be another. In which case
[STRIKE]Otherwise, if there's a third calculation, 'nest' it where the final 'C2' bit is.[/STRIKE]
Edit: apparantly you can't nest IF statements on google sheets. That will make things interesting
0 -
You can nest IF, but looks weird at first. D2 becomesI'm not going to second guess what the correct calculations should be.
If I've read the OP right then the calculation is that if the dropdown says 'Cost' it should be one calculation, and if it says anything else it should be another. In which case
[STRIKE]Otherwise, if there's a third calculation, 'nest' it where the final 'C2' bit is.[/STRIKE]
Edit: apparantly you can't nest IF statements on google sheets. That will make things interesting
=if(A2="Cost",C2-B2, IF(A2="Gift",B2/-1, IF(A2="Profit",C2, IF(A2="Bonus","send money to bluesnake"))))
0 -
Ah yes, I found when I was in the nest clicking cells didn't copy them into the formula, so I assumed it wasn't possible. Just tried manually entering the nested formula and it works fine.You can nest IF, but looks weird at first. D2 becomes=if(A2="Cost",C2-B2, IF(A2="Gift",B2/-1, IF(A2="Profit",C2, IF(A2="Bonus","send money to bluesnake"))))

The way this formula works is it first looks at A2 and decides if it contains 'Cost'. If it does, it sets the cell to C2-B2 and stops. If it doesn't, it looks at the second IF statement.
It then looks to see if A2 contains 'Gift'. If it does, it sets the value to the negative flip of C2 and stops. If it doesn't, it sets the value to C2 and as there are no more nests the formula finishes.0 -
Ah yes, I found when I was in the nest clicking cells didn't copy them into the formula, so I assumed it wasn't possible. Just tried manually entering the nested formula and it works fine.

The way this formula works is it first looks at A2 and decides if it contains 'Cost'. If it does, it sets the cell to C2-B2 and stops. If it doesn't, it looks at the second IF statement.
It then looks to see if A2 contains 'Gift'. If it does, it sets the value to the negative flip of C2 and stops. If it doesn't, it sets the value to C2 and as there are no more nests the formula finishes.
Thank you so much. Actually got it to work. Really appreciate that. :beer:0
This discussion has been closed.
Confirm your email address to Create Threads and Reply
Categories
- All Categories
- 355.9K Banking & Borrowing
- 255K Reduce Debt & Boost Income
- 456.2K Spending & Discounts
- 248.4K Work, Benefits & Business
- 606.1K Mortgages, Homes & Bills
- 179.1K Life & Family
- 264K Travel & Transport
- 1.5M Hobbies & Leisure
- 16.2K Discuss & Feedback
- 37.7K Read-Only Boards