Output of formula displayed as value in next cell

DaleKeel

Board Regular
Joined
Sep 11, 2019
Messages
56
Office Version
  1. 2013
Platform
  1. Windows
I have a formula in cell I4 that sums other formulas on same worksheet.
Can the result displayed in I4 be automatically transformed to a value in the adjacent cell J4?
Transformed not just displayed.

I have a formula in cell E4 that pulls formula results from another worksheet.
Can the result displayed in E4 be automatically transformed to a value in the adjacent cell F4?
Transformed not just displayed.

Thanks
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Put the following code in the events of your sheet, check if it is what you need.

VBA Code:
Private Sub Worksheet_Calculate()
  Application.EnableEvents = False
  [F4] = [E4]
  [J4] = [I4]
  Application.EnableEvents = True
End Sub

SHEET EVENT
Right click the tab of the sheet you want this to work, select view code and paste the code into the window that opens up.
 
Upvote 0
I put the code in as you wrote "Right click the tab of the sheet you want this to work, select view code and paste the code into the window that opens up.
The cells F4 and J4 remain blank. Should I be doing something else?
 
Upvote 0
On the Formulas ribbon, look to the right and click Calculation Options. On the dropdown list, verify that Automatic is selected.

Now press the F9 key.
Whenever any value in the formula changes, the cells will be updated.
 
Upvote 0
That worked perfectly. Thanks!
I have to do this from E4:E30 and of course I4:I30

Private Sub Worksheet_Calculate()
Application.EnableEvents = False
[F4] = [E4]
[J4] = [I4]
[F5] = [E5]
[J5] = [I5]
[F6] = [E6]
[J6] = [I6]

Application.EnableEvents = True
End Sub

Is there a better way of doing this than typing in each on at a time? This is not a problem for me with only 30 but this could end up to be a large number of times later on.

Thanks MUCH

Dale
 
Upvote 0
Try this:

VBA Code:
Private Sub Worksheet_Calculate()
  Application.ScreenUpdating = False
  Application.EnableEvents = False
  Dim i As Long
  For i = 4 To 30
    Range("F" & i).Value = Range("E" & i).Value
    Range("J" & i).Value = Range("I" & i).Value
  Next
  Application.EnableEvents = True
End Sub
 
Upvote 0
That worked perfectly! Thank you very much. Sorry I did not get back to you sooner had to fix some other things before trying your code.

Dale
 
Upvote 0
I'm glad to help you. Thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,980
Messages
6,122,563
Members
449,088
Latest member
Motoracer88

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