Date and time stamping cells

Excelgreenhand

Board Regular
Joined
Oct 18, 2009
Messages
101
I try to freeze date and time on the Excel cell and I know NOW() would change by the date and hour.
CTRL+; --> to freeze the date
CTRL+SHIFT+; --> to freeze the time

Please tell me how and where I could put the ASCII code on the cells. (Recording macro does not reveal the code)
Thanks.:confused:
 

Excelgreenhand

Board Regular
Joined
Oct 18, 2009
Messages
101
Re: ASCII expert help

I would like to add more that the purpose of my formula is when a sales person enter his name on Column A then Column B will have the date and Column C the time caught.
Thanks.
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,718
Office Version
2010
Platform
Windows
Re: ASCII expert help

Code:
Sub EGH()
  Range("A1").Value = Time
  Range("A2").Value = Date
  Range("A3").Value = Now
End Sub
 

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
Re: ASCII expert help

I try to freeze date and time on the Excel cell and I know NOW() would change by the date and hour.
CTRL+; --> to freeze the date
CTRL+SHIFT+; --> to freeze the time

Please tell me how and where I could put the ASCII code on the cells. (Recording macro does not reveal the code)
Thanks.:confused:
You don't put the ascii code in the cell, you just click on the cell press the keystroke combo and press enter, but that wont happen the way you want without the sort of code that shg showed you
 

Excelgreenhand

Board Regular
Joined
Oct 18, 2009
Messages
101
Re: ASCII expert help

The original purpose is to enter a piece of data on Column A then Column B and Column C will have automatically filled with data of "freeze" date and time WITHOUT any input from the user.
Any other ideas to fulfill this requirement !?
Thanks again.
 

shg

MrExcel MVP
Joined
May 7, 2008
Messages
21,718
Office Version
2010
Platform
Windows
Re: ASCII expert help

If you search the forum for "time stamp," you'll find a hundred examples.
 

FDibbins

Well-known Member
Joined
Feb 16, 2013
Messages
6,723
Re: ASCII expert help

The original purpose is to enter a piece of data on Column A then Column B and Column C will have automatically filled with data of "freeze" date and time WITHOUT any input from the user.
Any other ideas to fulfill this requirement !?
Thanks again.
As I pointed out, the only way to do something like this, would be with VBA, such as shg showed you, you cannot do it with formulas
 

Excelgreenhand

Board Regular
Joined
Oct 18, 2009
Messages
101
Re: ASCII expert help

Just want to get some new ideas that I might miss from the net.
Over 6 thousands and ten thousands posts it could not be wrong to learn from you guys. I might be back if there is new discovery.
Alright, SALUTE!
 

Excelgreenhand

Board Regular
Joined
Oct 18, 2009
Messages
101
Re: ASCII expert help

I'm back to have the following
Sendkeys "^;" --> for CTRL+";" no error on running BUT no date shown on active cell.
Any suggestions !?
Thanks.
 

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
34,351
Office Version
365, 2019, 2016, 2010
Platform
Windows, MacOS
Re: ASCII expert help

You do not need Sendkeys. You need code like the code shown by shg, you just need to put it in a worksheet_change event.
 

Forum statistics

Threads
1,082,335
Messages
5,364,696
Members
400,811
Latest member
MSBINinja

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top