Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
I want to name a worksheet with a fixed name, say "Total" and a dynamic cell value which will be a number. So, if the cell reference is A1, and the value of A1 is 37, the worksheet name would be "Total 37". The value in A1 would change, hence the dynamic.
I've found how to name the worksheet just for the cell value, but I need to combine the two. Thanks. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
Hi Micheal,
Am Tue, 24 May 2016 12:59:44 -0700 (PDT) schrieb michaelberrier: I want to name a worksheet with a fixed name, say "Total" and a dynamic cell value which will be a number. So, if the cell reference is A1, and the value of A1 is 37, the worksheet name would be "Total 37". The value in A1 would change, hence the dynamic. in the code module of the expected sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(0, 0) < "A1" Then Exit Sub ActiveSheet.Name = "Total " & Target.Value End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
On Tuesday, May 24, 2016 at 5:20:55 PM UTC-4, Claus Busch wrote:
Hi Micheal, Am Tue, 24 May 2016 12:59:44 -0700 (PDT) schrieb michaelberrier: I want to name a worksheet with a fixed name, say "Total" and a dynamic cell value which will be a number. So, if the cell reference is A1, and the value of A1 is 37, the worksheet name would be "Total 37". The value in A1 would change, hence the dynamic. in the code module of the expected sheet: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address(0, 0) < "A1" Then Exit Sub ActiveSheet.Name = "Total " & Target.Value End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
Hi Michael,
Am Wed, 25 May 2016 06:38:06 -0700 (PDT) schrieb michaelberrier: Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails. the macro runs when you change A1 Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#5
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
On Wednesday, May 25, 2016 at 9:51:03 AM UTC-4, Claus Busch wrote:
Hi Michael, Am Wed, 25 May 2016 06:38:06 -0700 (PDT) schrieb michaelberrier: Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails. the macro runs when you change A1 Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional It does not change. |
#6
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
On Wednesday, May 25, 2016 at 5:23:46 PM UTC-4, michaelberrier wrote:
On Wednesday, May 25, 2016 at 9:51:03 AM UTC-4, Claus Busch wrote: Hi Michael, Am Wed, 25 May 2016 06:38:06 -0700 (PDT) schrieb michaelberrier: Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails. the macro runs when you change A1 Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional It does not change. Rather, the macro doesn't run when the reference cell changes |
#7
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
On Wednesday, May 25, 2016 at 5:25:48 PM UTC-4, michaelberrier wrote:
On Wednesday, May 25, 2016 at 5:23:46 PM UTC-4, michaelberrier wrote: On Wednesday, May 25, 2016 at 9:51:03 AM UTC-4, Claus Busch wrote: Hi Michael, Am Wed, 25 May 2016 06:38:06 -0700 (PDT) schrieb michaelberrier: Ok, this will be an elementary question, but how do I get the private sub to run? I've tried doing a "Call" module, but it fails. the macro runs when you change A1 Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional It does not change. Rather, the macro doesn't run when the reference cell changes Ok, my error. The macro runs if their is an entered value in the reference cell. I'm trying to use a formula in that cell. Is that possible? |
#8
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
Hi Michael,
Am Wed, 25 May 2016 14:28:08 -0700 (PDT) schrieb michaelberrier: Ok, my error. The macro runs if their is an entered value in the reference cell. I'm trying to use a formula in that cell. Is that possible? if you have a formula in A1 you have to use Worksheet_Calculate event: Private Sub Worksheet_Calculate() ActiveSheet.Name = "Total " & Range("A1").Value End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional |
#9
Posted to microsoft.public.excel.misc
|
|||
|
|||
Dynamic + Fixed worksheet name
On Wednesday, May 25, 2016 at 6:08:08 PM UTC-4, Claus Busch wrote:
Hi Michael, Am Wed, 25 May 2016 14:28:08 -0700 (PDT) schrieb michaelberrier: Ok, my error. The macro runs if their is an entered value in the reference cell. I'm trying to use a formula in that cell. Is that possible? if you have a formula in A1 you have to use Worksheet_Calculate event: Private Sub Worksheet_Calculate() ActiveSheet.Name = "Total " & Range("A1").Value End Sub Regards Claus B. -- Vista Ultimate / Windows7 Office 2007 Ultimate / 2010 Professional MONEY! Thank you sir. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
run macro before closing if worksheet name is fixed | Excel Programming | |||
Speed of fixed array versus dynamic array | Excel Programming | |||
Fixed decimals worksheet specific | Excel Worksheet Functions | |||
UserForm TextBox with fixed Width and dynamic Height | Excel Programming | |||
How to add a fixed point to a dynamic chart | Excel Programming |