Home

Formula Help

%3CLINGO-SUB%20id%3D%22lingo-sub-827534%22%20slang%3D%22en-US%22%3EFormula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827534%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20creating%20a%20spreadsheet%20for%20my%20job.%20I%20need%20to%20set%20up%20a%20formula%20that%20if%20the%20specified%20cell%20%3D%20the%20word%20%22Add%2C%22%20it%20will%20add%20two%20different%20cells%20together%2C%20as%20well%20as%20if%20it%20%3D%22Delete%22%2C%20it%20will%20subtract%20said%20cells....%20is%20there%20a%20way%20to%20do%20that%3F%20If%20so%2C%20can%20someone%20help%20me%20out%20with%20that%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EExample%20of%20what%20I%20am%20trying%20to%20accomplish%3A%20If%20F2%3D%22Add%22%20then%20Cell%20N3%3D%20C3%2BM3%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20If%20F2%3D%22Delete%22%20then%20Cell%20N3%3DM3-C3%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-827534%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827599%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827599%22%20slang%3D%22en-US%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F399793%22%20target%3D%22_blank%22%3E%40tinabthatsme%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20try%20below%20formula%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3DIF(F1%3D%22Add%22%2CC1%2BM1%2CIF(F1%3D%22Delete%22%2CM1-C1%2C%22%22))%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESample%20file%20is%20also%20attached%20for%20your%20reference.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827602%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827602%22%20slang%3D%22en-US%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F399793%22%20target%3D%22_blank%22%3E%40tinabthatsme%3C%2FA%3E%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIt%20appears%20that%20you%20have%20just%20about%20figured%20the%20formula%20out%20yourself!%3C%2FP%3E%3CP%3EIn%20formulaic%20form%2C%20what%20you%20described%20in%20cell%20N3%20would%20be%3A%3C%2FP%3E%3CP%3E%3DIf(F2%3D%22Add%22%2C%20C3%2BM3%2C%20If(F2%3D%22Delete%22%2C%22M3-C3%2C%22%22))%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EHope%20this%20helps!%3CBR%20%2F%3EPReagan%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827605%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827605%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F399793%22%20target%3D%22_blank%22%3E%40tinabthatsme%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EYou%20have%20pretty%20much%20written%20the%20formula%20in%20describing%20the%20problem%2C%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CFONT%3E%3D%20IF(%20F2%3D%22Add%22%2C%20M3%20%2B%20C3%2C%20M3%20-%20C3%20)%3C%2FFONT%3E%3C%2FSTRONG%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827609%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827609%22%20slang%3D%22en-US%22%3E%3CP%3EPerfect!%20Thanks!%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-827613%22%20slang%3D%22en-US%22%3ERe%3A%20Formula%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-827613%22%20slang%3D%22en-US%22%3EThank%20you!%20I%20didn't%20add%20the%20appropriate%20%22%22%20in%20the%20formula%20which%20is%20why%20I%20couldn't%20get%20it%20to%20work%2C%20so%20thank%20you!%3C%2FLINGO-BODY%3E
Highlighted
tinabthatsme
New Contributor

I am creating a spreadsheet for my job. I need to set up a formula that if the specified cell = the word "Add," it will add two different cells together, as well as if it ="Delete", it will subtract said cells.... is there a way to do that? If so, can someone help me out with that? 

 

Example of what I am trying to accomplish: If F2="Add" then Cell N3= C3+M3 

                                                                      If F2="Delete" then Cell N3=M3-C3

 

4 Replies

Hi @tinabthatsme 

 

Please try below formula 

=IF(F1="Add",C1+M1,IF(F1="Delete",M1-C1,""))

 

Sample file is also attached for your reference. 

 

 

 

 

Hello @tinabthatsme,

 

It appears that you have just about figured the formula out yourself!

In formulaic form, what you described in cell N3 would be:

=If(F2="Add", C3+M3, If(F2="Delete","M3-C3,""))

 

Hope this helps!
PReagan

Perfect! Thanks!

Thank you! I didn't add the appropriate "" in the formula which is why I couldn't get it to work, so thank you!
Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
22 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
cntvertex in Discussions on
13 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies