Copying named cells

amzma

New Member
Joined
Jul 1, 2016
Messages
10
Hi there

I have a spreadsheet that I use to keep helpful formulas in for work that I need to do.

I have made two buttons that calculate two different cells but a specific number, when I am copying it into other workbooks the buttons arent working as it is copying the cells names, for example B18 I have renamed "osi" but when I copy it into a new sheet it reverts back to "b18", is there anyway to keep the name I have made?

Here is the VBA code I have made below;

Sub Macro1()
'
' Macro1 Macro
'

'
Range("owe").Select (this is normally cell B18)
ActiveCell.FormulaR1C1 = "=SUM(R[-5]C*77.5)"
Range("owe").Select
End Sub

Sub Macro2()
'
' Macro1 Macro
'

'
Range("osi").Select (this is normally cell B19)
ActiveCell.FormulaR1C1 = "=SUM(R[-6]C*45)"
Range("osi").Select
End Sub

Any help will be greatly appreciated!

Many thanks.
Amy
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.
Here is a thread on copying named ranges.

Hi Dave

Thank you for the info, is there a way to copy it without having to manually change the "workbook2" name each time as I copy it into lots of different sheets, all with different names.

Thanks.
Amy
 
Upvote 0

Forum statistics

Threads
1,223,931
Messages
6,175,465
Members
452,646
Latest member
tudou

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