View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Calendar manipulation

Hi Walter,

Am Mon, 21 Sep 2015 14:31:10 +0100 schrieb Walter Briscoe:

I have a calendar on an Excel 2003 sheet.

1) Column "A" is invisible for historical or hysterical reasons I can't
remember. The sheet is not frozen. Selecting column "B" and the list of
row numbers and doing Format/Columns/Unhide does nothing. In the
Immediate pane of the Code window, commands such as
columns(1).hidden=false also do nothing. This is unimportant, but I
report it.

2) Each month has 2 columns, the first is headed by a month name
followed by day numbers, the second is free format to hold data.
Currently columns("C:GJ") are hidden. I think I need a macro to unhide 2
columns next to the unhidden columns. e.g.
columns("GI:GJ").hidden=false. I am looking for an economical way to
encode this. My current thinking is a loop to search for a hidden =
false cell and make 2 previous cells hidden=true.

3) I also show this file on my Android mobile phone or cellphone.
cells("GK",1) is =DATE(2015,8,1) with format = "mmm"). On the phone,
this appears as 2103 and sometime later is converted to "Aug". The app
is "Sheets". Can anyone suggest a more efficient way to generate "Aug".


1) Put the cursor over the left column separator of column B until it
changes to a double arrow and drag it to the right.

2) Are other columns hidden than A and C:GJ? If not then try following
code to unhide the last two hidden columns:

Sub Test()
Dim RngAdr As String
Dim varRng As Variant

RngAdr = ActiveSheet.UsedRange.SpecialCells(xlCellTypeVisib le).Address
varRng = Split(RngAdr, ",")
varRng = Split(varRng(1), ":")
Range(varRng(0)).Offset(, -2).Resize(1, 2).EntireColumn.Hidden = False
End Sub

3) Another method is =TEXT(DATE(2015,8,1),"MMM")
But I don't know if that is better for your Android mobile


Regards
Claus B.
--
Vista Ultimate / Windows7
Office 2007 Ultimate / 2010 Professional