I told the Manager who wants the AM/PM gone so that the VP
will be happy, that AM/PM displays in all formats realting
to time.
I went over the regional thing with the Manager. I
explained that the system just works that way.
I never said, but personally, all I really care is that
the data is right, the formulas work, and any Macro I can
do to speed things up works correctly.
So far, the only consistent comment I have got is the text
based workaround. The key formula is =mmss("D9-d10-d11")
in the total cell. At the core of this is a Macro written
by someone else, that somehow facilitates the text to
time event...
***************
Public cva, cvb, cel, oper As String
Public cvfina, cvfinb As Long
Function mmss(a As String) As String
Application.Volatile
Dim i As Integer
cvfina = Empty
cvfinb = Empty
For i = 1 To Len(a)
tem = Mid(a, i, 1)
Select Case tem
Case "+", "-"
If Not IsEmpty(cel) Then cnvrt
oper = tem
cel = ""
Case Else
cel = cel & tem
End Select
Next i
If Not IsEmpty(cel) Then cnvrt
If cvfina < 0 And cvfinb > 0 Then
Do
cvfinb = cvfinb - 60
cvfina = cvfina + 1
If cvfinb = 0 Then Exit Do
Loop Until cvfina >= 0
End If
If cvfinb < 0 And cvfina > 0 Then
Do
cvfinb = cvfinb + 60
cvfina = cvfina - 1
If cvfina = 0 Then Exit Do
Loop Until cvfinb >= 0
End If
If Abs(cvfinb) > 60 Then
cvfina = cvfina + Fix(cvfinb / 60)
cvfinb = cvfinb Mod 60
End If
If cvfinb < 0 And cvfina >= 0 Then
cvb = Format(Abs(cvfinb), "00")
cva = "-" & cvfina
Else
cvb = Format(Abs(cvfinb), "00")
cva = Format(cvfina, "0;-0")
End If
cel = Empty
oper = emtpy
tem = Empty
cvfina = Empty
cvfinb = Empty
i = Empty
mmss = cva & ":" & cvb
cva = Empty
cvb = Empty
End Function
Sub cnvrt()
Dim i As Integer
Dim cval, ctem As String
Dim flg As Boolean
cva = ""
cvb = ""
flg = True
cval = Range(cel).Value
For i = 1 To Len(cval)
ctem = Mid(cval, i, 1)
If ctem = ":" Then
flg = False
Else
If flg = True Then
cva = cva & ctem
Else
cvb = cvb & ctem
End If
End If
Next i
If oper = "+" Or oper = "" Then
cvfina = cvfina + Val(cva)
cvfinb = cvfinb + Val(cvb)
Else
cvfina = cvfina - Val(cva)
cvfinb = cvfinb - Val(cvb)
End If
cval = emtpy
ctem = Empty
i = Empty
End Sub
Sub cnvrtformula()
Dim xsel, xform As String
For Each sel In Selection
xform = sel.Formula
xsel = Left(xform, 1)
xform = Right(xform, Len(xform) - 1)
Select Case xsel
Case "=", "+", "-"
If Not IsNumeric(Mid(sel, 2, 1)) Then
sel.NumberFormat = "General"
sel.Formula = "=mmss(""" & xform & """)"
sel.HorizontalAlignment = xlRight
End If
End Select
Next sel
End Sub
*************
And as near as I understand it, this is made up of Two
Macros.
Well, it suffers from the problem that as soon as someone
works with the cell's, then the illusion goes.
I had been told, or rather it was suggested to me, that
Custom format would allow me to minus out the AM or PM
option.
Anyway, it's totally loopy. But, the manager said it is
what she wants because it's what the VP wants.
Well, they have sent me around and around on a simple
spreadsheet till I am just teaching myself VB info.
The text option will display the info in the right way
without the time format. I can Macro that easily enough.
It's just that this stupid AM/PM thing is not going to
work except by an illusion, which someone has given to me
in the above Macro, but if I follow that way, it will
affect my two raw data files for the entire system I
loaded reports from.
As it is now, I can do reports on just about any aspect of
the call loads in two different skill sets, two separate
tiers, and using Two principle raw data sets, and two
principle service data files....
But they want the AM/PM off the display... and no, I
can;t take it off the Settings
Thats an idea... but the VP and the manager are just smart
enough to be stupid....
I explained to the Manager that it can't be done without
re-writing the core code , and all she said was " Oh...
you're killing me"...
Sorry people... but I had to try; I hope you understand.
Maybe there is a way, especially since I just need a
display of time.
Stupid thing about it is that if I had a Mac, I could do
it no problems.
Ta