Can formula be removed by Excel

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,215
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
Can formula's in the cells be removed by Excel program/functions?

In Worksheet5, C2:C48 contains numeric values generated thr' formula =D2:D48.
Ex:
C2=D2

At a particular time, to remove formulas from C2:C48; I select, copy, paste special, values, Ok, Enter.

But can it be done by say putting a number 1 in C1 or by any other method.

This worksheet contains only these 2 columns.
Thanx in adv
 
Peter
I hope this will bring the formula
=IF((F2-I2)=0,0,((G2-J2)/(F2-I2)))
back in C2:C48?
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I tried in Excel WITHOUT real time DDE feeds

1. Code gets triggered when C1<=now (PROPER)
2. BUT when B1<=now; the code DOES NOT put the formulas back in C2:C48

However, I would try tomorrow also in real time with DDE feeds.

Comments please
 
Upvote 0
I may have it wrong, but post 68 has no mention of C1 at all, only B1. Please clarify about both cells if they are relevant.
 
Upvote 0
Yes Both B1 & C1 are relevant.
C1 is ALWAYS < B1

Code should put the formula =IF((F2-I2)=0,0,((G2-J2)/(F2-I2)))
in C2:C48 when B1<=now.

 
Upvote 0
So in what circumstances does the suggestion in post 69 fail?
 
Upvote 0
I did not try the last code since I was bit vary.

I changed my requirement (Excel situation):

Requirement is:

When C1<=now then

C2:C48 should become values equal to E2:E48
G2:G48 should become values equal to I2:I48
L2:L48 should become values equal to M2:M48

C2:C48; G2:G48 & L2:L48 contains values only (NO FORMULAS ever).

How to accomplish?
Thanks in advance.

Sheet1

CDEFGHIJKLM
19/15/2018 10:30
2744.48 744.48 800.08 800.08 900.09900.09

<colgroup><col style="FONT-WEIGHT: bold; WIDTH: 30px"><col style="WIDTH: 123px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"><col style="WIDTH: 64px"></colgroup><tbody>
</tbody>
 
Upvote 0
Assuming that you still want this triggered when the worksheet calculates & you don't want anything to happen if C1 > Now
Code:
Private Sub Worksheet_Calculate()
  If Range("C1").Value <= Now Then
    Range("C2:C48").Value = Range("E2:E48").Value
    Range("G2:G48").Value = Range("I2:I48").Value
    Range("L2:L48").Value = Range("M2:M48").Value
  End If
End Sub
 
Upvote 0
Code in post 78 WORKS.

But it "keeps on" calculating the worksheet whole day & thereby the Excel file seems to have been got locked....

What I mean that can the code be made faster & not to calculate the whole worksheet every moment but to do when B1<=Now
 
Upvote 0
But it "keeps on" calculating the worksheet whole day & thereby the Excel file seems to have been got locked....
If you have other formulas dependent on those column C, G & L ranges then
Code:
Private Sub Worksheet_Calculate()
  If Range("C1").Value <= Now Then
    Application.EnableEvents = False
    Range("C2:C48").Value = Range("E2:E48").Value
    Range("G2:G48").Value = Range("I2:I48").Value
    Range("L2:L48").Value = Range("M2:M48").Value
    Application.EnableEvents = True
  End If
End Sub



.... to do when B1<=Now
What does B1 have to do with anything? Your changed requirement in post 77 only mentioned C1. Too many changes to keep up with. :confused:

I changed my requirement (Excel situation):

Requirement is:

When C1<=now then

C2:C48 should become values equal to E2:E48
G2:G48 should become values equal to I2:I48
L2:L48 should become values equal to M2:M48
 
Upvote 0

Forum statistics

Threads
1,216,185
Messages
6,129,388
Members
449,506
Latest member
nomvula

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