![]() |
Name Range Format
Hello Experts
I have a macro code that combines a name range (which is a date) with the word "Total". The only problem with this is that the new word is not in the format I want. The combined word looks like this: 09/01/2007 Total I want it to look like this. Sept 2007 Total I attached my code below. Can anyone help? David Sub Trim1() For Each c In Worksheets("CoverSheet").Range("c27:c32").Cells If (c.Value) Like "*" Then c.Value = Range("Production_Month") & " " & "Total" Next End Sub |
Name Range Format
Try
If (c.Value) Like "*" Then c.Value = Format(Range("Production_Month"),"mmm yy") & " " & "Total" -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "David T" wrote in message ... Hello Experts I have a macro code that combines a name range (which is a date) with the word "Total". The only problem with this is that the new word is not in the format I want. The combined word looks like this: 09/01/2007 Total I want it to look like this. Sept 2007 Total I attached my code below. Can anyone help? David Sub Trim1() For Each c In Worksheets("CoverSheet").Range("c27:c32").Cells If (c.Value) Like "*" Then c.Value = Range("Production_Month") & " " & "Total" Next End Sub |
Name Range Format
Chip-
You are awesome!!! Thanks!!!!!!!!! "Chip Pearson" wrote: Try If (c.Value) Like "*" Then c.Value = Format(Range("Production_Month"),"mmm yy") & " " & "Total" -- Cordially, Chip Pearson Microsoft MVP - Excel, 10 Years Pearson Software Consulting www.cpearson.com (email on the web site) "David T" wrote in message ... Hello Experts I have a macro code that combines a name range (which is a date) with the word "Total". The only problem with this is that the new word is not in the format I want. The combined word looks like this: 09/01/2007 Total I want it to look like this. Sept 2007 Total I attached my code below. Can anyone help? David Sub Trim1() For Each c In Worksheets("CoverSheet").Range("c27:c32").Cells If (c.Value) Like "*" Then c.Value = Range("Production_Month") & " " & "Total" Next End Sub |
All times are GMT +1. The time now is 12:53 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com