09-28-2011, 11:29 PM | #1 |
Major General
![]() ![]() ![]() 2422
Rep 5,627
Posts |
![]()
how do i add a function to items from a drop down list?
i want the value in b4 to be added/subtracted to the value in b1 from the drop down list. help much appreciated, thanks guys.
__________________
Cars: 07 335i ► 08 328i ► 11 328xi ► 13 M3 ► 17 M4 ► 14 M6
Last edited by hl0m4n; 09-29-2011 at 01:42 PM.. |
09-28-2011, 11:37 PM | #2 |
Colonel
![]() ![]() 40
Rep 2,334
Posts |
=if(A4="Add",B1+B4,B1-B4)
|
Appreciate
0
|
09-28-2011, 11:40 PM | #3 |
Banned
![]() 509
Rep 10,309
Posts
Drives: A///MERICAN!!!
Join Date: Mar 2010
Location: A///MERICA!!!
|
I believe you can relate the formula with the column you use when you tell data validation which cells to use. I know I've done this with pivot tables before, but mind is fuzzy. I don't remember it being as simple as what was just posted though
|
Appreciate
0
|
09-28-2011, 11:48 PM | #5 |
Banned
![]() 509
Rep 10,309
Posts
Drives: A///MERICAN!!!
Join Date: Mar 2010
Location: A///MERICA!!!
|
well fuck, if it is that simple, google has failed me
|
Appreciate
0
|
09-29-2011, 12:57 AM | #6 |
Major General
![]() ![]() ![]() 2422
Rep 5,627
Posts |
thanks silver, this worked for me. but how do i also add subtract in that formula so if the subtract is chosen from the drop down it performs subtraction?
with your code right now, if i choose subtract, i get a FALSE in the cell.
__________________
Cars: 07 335i ► 08 328i ► 11 328xi ► 13 M3 ► 17 M4 ► 14 M6
|
Appreciate
0
|
09-29-2011, 10:08 AM | #7 |
Major
![]() ![]() 300
Rep 1,088
Posts |
You shouldn't get that error. It's a IF/ELSE function. If A4 does not = Add, then it subtracts.
Or you can do this if you want to be a little more proper: =IF(A4="Add",B1+B4, IF(A4="Subtract",B1-B4)) Last edited by jpsum; 09-29-2011 at 10:20 AM.. |
Appreciate
0
|
09-29-2011, 01:23 PM | #8 |
atlien
17
Rep 371
Posts
Drives: '11 e90 335i
Join Date: May 2011
Location: atlanta
|
dont put a space before the second IF statement though. no spaces after commas
|
Appreciate
0
|
09-29-2011, 01:44 PM | #9 |
Major General
![]() ![]() ![]() 2422
Rep 5,627
Posts |
thank you very much guys
![]() quick question though, is the formula different if i wanted to do the entire row as pictured below? when i tried to just drag the box from formula, it wouldn't compute.
__________________
Cars: 07 335i ► 08 328i ► 11 328xi ► 13 M3 ► 17 M4 ► 14 M6
|
Appreciate
0
|
09-29-2011, 01:49 PM | #10 |
Captain
![]() ![]() ![]() ![]() ![]() 51
Rep 714
Posts |
not exactly sure what you're trying to do but you probably want B1 to be absolute. Put your cursor on it and press F4, then try autofilling again.
__________________
Black Dakota | Aluminum | Sport | Premium | Cold | iDrive | CA
|
Appreciate
0
|
09-29-2011, 02:02 PM | #11 |
Major
![]() ![]() 300
Rep 1,088
Posts |
Starting to think you are just trolling us here. But one last help since you are an old member.
Copy what I have in C4 and then just drag and copy the rest of the rows down. The last row (13) is your answer. This is a very hard way to do a very simple task. |
Appreciate
0
|
Post Reply |
Bookmarks |
|
|