L
Legacy 185509
Guest
I am trying to add number to cell using button so don't have to use keyboard
the format of cell is
7/12/2011 15:00:00
First way
I can add date & month using +30 & +1 , I cannot time
Second way(data & time to decimal & fractions)
I can (-) subtract day by using -1
Type The Date And Time 12/12/2004 18:00 In Any Cell
Right Click In The Cell And Select Format Cells And Click The Number Tab, Then General Under Categories:
Look In The Sample: Box And You Should See 38333. 75, Where 38333 Represent The Date (Serial Number) And . 75 Represents The Time (Decimal Fraction).
second way look way better please help me to able to change date & time using vba & button
here is my code
to subtract 1
to add 1
+30 & -30
the format of cell is
7/12/2011 15:00:00
First way
I can add date & month using +30 & +1 , I cannot time
Second way(data & time to decimal & fractions)
I can (-) subtract day by using -1
Type The Date And Time 12/12/2004 18:00 In Any Cell
Right Click In The Cell And Select Format Cells And Click The Number Tab, Then General Under Categories:
Look In The Sample: Box And You Should See 38333. 75, Where 38333 Represent The Date (Serial Number) And . 75 Represents The Time (Decimal Fraction).
second way look way better please help me to able to change date & time using vba & button
here is my code
to subtract 1
PHP:
Sub minzz()
Sheets("Sheet1").Select
Range("C1") = Range("C1") - 1
End Sub
to add 1
PHP:
Sub pluz()
Sheets("Sheet1").Select
Range("C1") = Range("C1") - 1
End Sub
+30 & -30
PHP:
Sub mminz()
Sheets("Sheet1").Select
Range("C1") = Range("C12") - 30
End Sub
Sub mpluz()
Sheets("Sheet1").Select
Range("C1").Value = Range("C1").Value + 30
'Range("C1") = Range("C1") + 30
End Sub