VBABEGINER
Well-known Member
- Joined
- Jun 15, 2011
- Messages
- 1,284
- Office Version
- 365
- Platform
- Windows
In Col A, I have time..
In Col B, I use Hour formula to get Hour..
I got the answer.."6"
...................................
Then I need AM & PM in Value..So modified formula like below..
Col C new formula
Col B then modified..
I got the answer.."6 AM"
---------------------------
I make a pivot of this. In pivot, dates are NOT ordered in 0 AM, 1 AM, 2 AM,....and so on..(In Row label)*2nd edit
Therefore, I do Sort AtoZ, but now values display like....0 AM, 1 AM, 10 AM, 11 AM..
Which incorrect...
Can any please guide me how do I this pivot Or any new formula which directly gives me time values correctly..
Code:
6/14/2017 6:22:23 AM
Code:
=HOUR(A2)
I got the answer.."6"
...................................
Then I need AM & PM in Value..So modified formula like below..
Col C new formula
Code:
=IF(MOD(A2,1)>0.5,"PM","AM")
Col B then modified..
Code:
=HOUR(A2) &" " &C2
I got the answer.."6 AM"
---------------------------
I make a pivot of this. In pivot, dates are NOT ordered in 0 AM, 1 AM, 2 AM,....and so on..(In Row label)*2nd edit
Therefore, I do Sort AtoZ, but now values display like....0 AM, 1 AM, 10 AM, 11 AM..
Which incorrect...
Can any please guide me how do I this pivot Or any new formula which directly gives me time values correctly..
Last edited: