Question : How do i display month abbeviations instead of months in the proposed solution

Hi, The solution below works great.  However, how would i show only the monthly abbreviations (OCT, NOV, DEC, etc.) instead of the full month names
*******************************************8
Hi, I have a range of headers in excel that are all select boxes containing months.  Based on selection of any of the drop downs, I would like for the entire range to populate correctly.

For instance, if there is a 1X3 list and the user picks the first cell on the left as January, how could i make the adjacent two cells populate with February and March.
**Alternatively, if the user picked March from the right, the previous two cells would populate with February and January.
*****************************************************
A solution has been posted if this behavior is to occur once in the worksheet.  However, there are multiple places on a single worksheet that require user selection of months.  

So, the range could be a 1X3 range when three montly headers need to be populated from B1:D1.  But there is another range in B50:G50 that requires 6 monthly headers to be populated.  

The original solution (that works great) is here, but according to the responder, the code needs to be changed to accomodate multiple selection areas:  
**************
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rngMonitor As Range, rngMonthEntry As Range, rngCell As Range
    Dim lngCol As Long
    Dim dteEntry As Date
    On Error Resume Next
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
    Set rngMonitor = Range("B1:D1")
    Set rngMonthEntry = Intersect(Target, rngMonitor)
    If Not rngMonthEntry Is Nothing Then
        lngCol = rngMonthEntry.Column - rngMonitor.Column
        dteEntry = DateAdd("m", -lngCol, DateValue("1-" & rngMonthEntry.Value & "-2009"))
        For Each rngCell In rngMonitor
            rngCell.Value = Format(dteEntry, "mmmm")
            dteEntry = DateAdd("m", 1, dteEntry)
        Next rngCell
    End If
    With Application
        .EnableEvents = True
        .ScreenUpdating = True
    End With
End Sub
*******************************************************

Answer : How do i display month abbeviations instead of months in the proposed solution

Hello username5000,

Try replacing:
            rngCell.Value = Format(dteEntry, "mmmm")
with
            rngCell.Value = Format(dteEntry, "dd mmm yyyy")

Regards,

chris_bottomley
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
Private Sub Worksheet_Change(ByVal Target As Range)
    Dim rngMonitor As Range, rngMonthEntry As Range, rngCell As Range
    Dim lngCol As Long
    Dim dteEntry As Date
    On Error Resume Next
    With Application
        .ScreenUpdating = False
        .EnableEvents = False
    End With
    Set rngMonitor = Range("B1:D1")
    Set rngMonthEntry = Intersect(Target, rngMonitor)
    If Not rngMonthEntry Is Nothing Then
        lngCol = rngMonthEntry.Column - rngMonitor.Column
        dteEntry = DateAdd("m", -lngCol, DateValue("1-" & rngMonthEntry.Value & "-2009"))
        For Each rngCell In rngMonitor
'            rngCell.Value = Format(dteEntry, "mmmm")
            rngCell.Value = Format(dteEntry, "dd mmm yyyy")
            dteEntry = DateAdd("m", 1, dteEntry)
        Next rngCell
    End If
    With Application
        .EnableEvents = True
        .ScreenUpdating = True
    End With 
End Sub
Random Solutions  
 
programming4us programming4us