# How to combine formula parts from cells ??

#### moogeedoo

##### New Member
Dears is it able to concat a formula from cells
A1 = 5
B1 = +
C1 = 3
I want to put a formula in D1 to calculate A1, b1 and c1 in example 1 the result should be 8 so if i change the sign "+" in B1 to "-" the result in D1 should be 2 like example 2
example 1

example 2

### Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

#### Eric W

##### MrExcel MVP
There is a way to create a formula from pieces like this, but it's complicated and not really a good idea. Or you could write a UDF and use the VBA Evaluate function. What makes more sense though is to make a list of the possible functions you want in B1, and create a function that does all of them, like this:

Book2
ABCD
15*38
25-32
35*38
45/31.666667
55^3125
Sheet2
Cell Formulas
RangeFormula
D1:D5D1=CHOOSE(MATCH(B1,{"+","-","/","*","^"},0),A1+C1,A1-C1,A1/C1,A1*C1,A1^C1)

#### Eric W

##### MrExcel MVP
I just realized that * can be a wildcard, which is why row 3 isn't right. To fix that, it's easiest to use "x" for the times operator instead. Also note that adding the "/" to cell B4 required putting a ' in front of it.

Book2
ABCD
15+38
25-32
35x315
45/31.666667
55^3125
Sheet2
Cell Formulas
RangeFormula
D1:D5D1=CHOOSE(MATCH(B1,{"+","-","/","x","^"},0),A1+C1,A1-C1,A1/C1,A1*C1,A1^C1)

#### moogeedoo

##### New Member
Thank U Mr. Eric for UR support but like this it will not be a good idea as U said, I will try it in another ways, Merry Christmas

Replies
1
Views
49
Replies
3
Views
80
Replies
10
Views
232
Replies
6
Views
264
Replies
8
Views
584

1,128,018
Messages
5,628,167
Members
416,297
Latest member
Kara Payne

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back