Split formula in cell

Dannyh1

Well-known Member
Joined
Nov 18, 2009
Messages
1,144
Hi,

Is there a way I can split formula in cells

e.g C1 = A1+B1

I want to be

C1 = A1

i.e seperated by the '+'

Many Thanks
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Hi Peter,

Bascially I have numerous cells which currently have addition formula's (adding 2 cells together).

I no longer want the addition part of the formula.

e.g's
C1 = A1+B1

I now want to be C1 = A1

D3 = C2+D2

I now want to be D3 = C2

etc..

Thanks
 
Upvote 0
Hi. Try this - select the range then run the macro

Code:
Sub ModFormula()
Dim c As Range
For Each c In Selection
    With c
        .Formula = Left(.Formula, InStr(.Formula, "+") - 1)
    End With
Next c
End Sub
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,887
Members
452,948
Latest member
Dupuhini

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Back
Top