Excel formula not calculating

baba92

New Member
Joined
Mar 25, 2022
Messages
7
Office Version
  1. 2016
Platform
  1. Windows
Hi,
I tried to simplify my issue: I wrote in my cell C2 the following formula: '=SUM(1;2)

When I copy paste this formula in cell C4 I can read =SUM(1;2) in the cell but it does not calculate it. I need to click in the formula and just press enter for it to calculate.
I assume the quote is messing things up but when I control F for the quote, excel tells me there is no quote so I can't remove it.
I also did control F and replaced "=" by "=" which worked but it does not work on vba, I don't know why.

Basically I want my vba code to do this for many formulas. Copy pasting the formulas and then calculating it automatically.
I tried range("C4").formula=range("C2").formula but I received an error message ("Application-defined or obkect-defined error")

Do you have an idea?
 

Attachments

  • Screenshot 2022-03-31 194546.png
    Screenshot 2022-03-31 194546.png
    17.5 KB · Views: 22
Sub Macro6()
Range("C4").Formula = Range("C2").Formula
End Sub

I receive this message "Application-defined or object-defined error"
The only way you will get that error with this code is if the sheet is protected and C4 is locked.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December

Forum statistics

Threads
1,224,823
Messages
6,181,178
Members
453,021
Latest member
Justyna P

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