How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Richard Your Own Question
Richard, Software Engineer
Category: Microsoft
Satisfied Customers: 44714
Experience:  Over 15 year experience resolving Microsoft Office Issues
Type Your Microsoft Question Here...
Richard is online now

Calculation sign scenarios

Resolved Question:

Attachment: 2015-08-27_090233_calc_cell_formula.xlsx

hi, i have 3 cells ie. "5" "*" "2" answer = 10. I want to change the middle cell sign ie. "*" to a "+" or "-" depending on my scenario. The issue is in the answer cell formula. Col A B C D R1 5 * 2 10 normally in cell D1 i would enter a formula =A1*C3 which would give me 10, i need a formula in cell D1 that replaces the * from whatever is entered in cell B1 ie. i want the ability to change the * to a + or - or / depending on my scenario for my financial model. eg. CELL D1 "=SUM(A1,B1,C1)" However this formula gives me an error message.

Submitted: 2 years ago.
Category: Microsoft
Expert:  Richard replied 2 years ago.
Thank you for your question, my name is ***** ***** I look forward to assisting you.
Please note, click on Reply to Expert to reply to me, a rating is only needed when we are finished.
So to clarify, the operator eg: * would come from another cell so you could change this and it would update the formula correct?
Customer: replied 2 years ago.
Hi, yes that is correct.
Expert:  Richard replied 2 years ago.
ok pretty good question
there are only two ways to do this, either via if statements
So you would say =if(A1="+",A2+A3,if(A1="*",A2*A3) ect
Or via VBA
For some reason your file wont open, but if you upload it to and give me the download link, I can make an example with the if statements.
Customer: replied 2 years ago.
Expert:  Richard replied 2 years ago.
I did it for you and you can download it from here
This is the way you make your requirement happen.
If you have any problems, or would like any additional information or assistance, please do not hesitate to let me know.
Else if you can take a second to rate my service by clicking one of the stars at the top of the screen then submit, that would be greatly appreciated.
Thank you
Customer: replied 2 years ago.
Is there any way to concatenate the 3 cells creating a text output showing the formula and then convert it from text format to a active formula?
Expert:  Richard replied 2 years ago.
Thats what I was looking at doing but it wont work on the operator.
But this function works just as well.
Richard and 3 other Microsoft Specialists are ready to help you
Customer: replied 2 years ago.
Ok thanks, ***** ***** well have some further questions down the line as ultimately this needs to be performed across all operators and multiple measures in 1 formula.