Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Lookup a value when the range contains a high - low format | Excel Discussion (Misc queries) | |||
conditional format a range | Excel Discussion (Misc queries) | |||
how do i format a cell based on format of a range of cells? | Excel Discussion (Misc queries) | |||
Conditional format IP range | Excel Discussion (Misc queries) | |||
Format Telephone Cell Range | Excel Worksheet Functions |