Automatic date & time entry using Excel VBA

  Рет қаралды 383,761

Dinesh Kumar Takyar

Dinesh Kumar Takyar

Күн бұрын

Пікірлер: 225
@codalisa007
@codalisa007 5 жыл бұрын
Thank you sir. As I've said on previous occasions I like it because you make mistakes (like we all do) and you alter things to correct it which shows us how to correct our own work. If you hadn't done that we'd have to scour the code (which can be lengthy) and have no idea why it has gone wrong, just the error marked in the code, but not what has led to the mistake. Well done!
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Appreciate your feedback.
@eyemoksha
@eyemoksha 4 жыл бұрын
You are the God of Macros Mr. Dinesh.,,,,!!!!
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Thanks. Please share the tutorials with your friends.
@hotshotwpg
@hotshotwpg 4 жыл бұрын
Thank you very much! I really appreciate it. All other videos only showed how to enter the date in a way that would change all entries, each day that you open the file. Very good tutorial. Thank you
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You are welcome! Please share with your friends too.
@ibm98852
@ibm98852 5 жыл бұрын
Thanks for useful video. Your explanation is awesome with complete information in short time.
@rajsheth9
@rajsheth9 5 жыл бұрын
Works Perfectly!! Just don't Copy & past...
@joselicop872
@joselicop872 9 жыл бұрын
I have been looking and needing for this since last year! Thanks for making this video my friend. Hope I can use it correctly. Many thanks!
@sonu1patel
@sonu1patel 10 жыл бұрын
Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 To 100 If Cells(i, "A").Value "" And Cells(i, "B").Value "" And Cells(i, "C").Value "" And Cells(i, "D").Value "" And Cells(i, "E").Values "" Then Cells(i, "E").Value = Date & "" & Time Cells(i, "E").NumberFormat = "m/d/yyyy h:mm am/pm" End If Next Range("E:E").EntireColumn.AutoFit End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub
@Exceltrainingvideos
@Exceltrainingvideos 11 жыл бұрын
Cells(i, J).Value = Date & Quote & Time Cells(i, O).Value = Date & Quote & Time Put J and O in quotes. Replace Quote with an empty string as shown in the video. You may like to visit: familycomputerclub-dot-com/auomatic-date-time-entry-excel-vba.html Replace -dot- with .
@ARYDigitalDollar
@ARYDigitalDollar 6 жыл бұрын
sir your give vba code successfully worked but undo Function not working after this.
@jhunchua8316
@jhunchua8316 Жыл бұрын
thank u sir i learn so much
@prashantparmar5014
@prashantparmar5014 Жыл бұрын
Sir, thank you very much for clear our question. By user form I enter data to my excel sheet. The data shown in excel sheet can't be edited & deleted in excel sheet but only by user form command button. How it is done ? Please guide.
@bhupendrabissa2883
@bhupendrabissa2883 4 жыл бұрын
Thank You Sir. I really liked your video and the simplicity in your accent. I am interested in VBA Tutorial so if you can provide me more details on VBA basics and advance then it will be great help.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Sure I will! This link will help to learn basics and advanced features in Excel VBA: www.exceltrainingvideos.com/excel-vba/excel-2003-vba/
@leandrocursino5569
@leandrocursino5569 6 жыл бұрын
Incrível esse vídeo - Consegui inserir essa função na minha planilha. Parabéns.
@0x01sudipta
@0x01sudipta 8 жыл бұрын
You are like a Boss, Thanks for the awesome tutorial
@tiendinh999
@tiendinh999 9 жыл бұрын
Thank you very much, it is very useful !, I try it and it works well.
@Pankaj-Verma-
@Pankaj-Verma- 5 жыл бұрын
Super Great! Thank you so much for your kind help!
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
You are welcome. Please share the knowledge with your friends also on social media.
@vb6code
@vb6code 11 жыл бұрын
Thanks for sharing, but I don't think you need for loop try below code - If Cells(Target.Row, 1) = "" Or Cells(Target.Row, 2) = "" Or Cells(Target.Row, 3) = "" Or Cells(Target.Row, 4) = "" Then Exit Sub Cells(Target.Row, 5).Value = Now
@bernardwilliams4051
@bernardwilliams4051 11 жыл бұрын
Works wonderfully. Thank you so much.
@kashankhan3137
@kashankhan3137 5 жыл бұрын
Dear Sir, I am very impressed by your video lectures. You are a wonderful teacher. I need your help regarding following issue. I am a very basic learner of EXCEL VBA. I am creating an Attendance Sheet in MS -EXCEL. Actually I am running a small school. I want to take attendance of my students with following procedures. 1. When a student arrive to school, he will show his ID Card (containing Barcode, which is his roll number actually). 2. The Barcode Scanner will read the BARCODE from his ID Card and display his roll number into a TEXT BOX of a User Form. (This User form already has created by me). 3. Now the problem is that when scanner gives output to the text box, THE TEXT BOX SHOULD AUTOMATICALLY TRANSFER THIS VALUE TO EXCEL CELL AND THEN THE TEXT BOX SHOULD REFRESH AUTOMATICALLY AND READY TO TAKE ANOTHER INPUT. MEANS THAT I DON’T WANT TO HIT ANY KEY TO PROCESS THE REFRESHING OF TEXT BOX. 4. Is there any way to do that…… Thanks in advance. Your student KASHAN
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Let's say you wish to transfer the data to sheet1 and column 1. Your command button on the userform will do the following on click: We find the next blank row to enter the roll number via scanner via textbox: nextblankrowrow = sheet1.Cells(Rows.count, 1).End(xlUp).Offset(1, 0).Row sheet1.cells(nextblankrow,1)=textbox1 textbox1="" textbox1.setfocus Hope this helps.
@kashankhan3137
@kashankhan3137 5 жыл бұрын
@@Exceltrainingvideos Sir, I see following error. Sheet1.Cells(nextblankrow, 1) = TextBox1 This line has yellow now and following error is appeared Run Time Error 1004 Application-defined or object re-defined error. Also please note that i don't want to press "ENTER" key to transfer the data to Sheet1, Column1. Please help me. Regards, KASHAN
@kashankhan3137
@kashankhan3137 5 жыл бұрын
When I show Barcode through scanner each character of Roll No. transfer to each next line. The Roll# consists of 6 characters when i scan the barcode each character transfers to new line. i.e. a roll number takes 12 lines to accommodate 6 characters. Please help. thanks in advance KASHAN
@kashankhan3137
@kashankhan3137 5 жыл бұрын
Dear Sir, Finally, I have successfully solved my problem. Thank you so much. Regards, KASHAN
@mohanuk2216
@mohanuk2216 9 жыл бұрын
Great work sir thanks a lot
@foroughashrafi7266
@foroughashrafi7266 9 жыл бұрын
Hello I watched your videos they are so helpful thank you so much, Also I have a question? If I want a date for example today that change every two months automatically and also show me with color that it changed, how can i do it? thanks in advance!
@arecloganathan
@arecloganathan 8 жыл бұрын
Hai... Dinesh this video is great and it works well... but in my case I want the date stamp on a particular cell only using VB, like a date on a form. Not in row or column. Pls help me out here.. Thnx
@create252k
@create252k 6 жыл бұрын
The code works great. How do I make sure that when I go back and erase a cell's value the automatic date and type also update (display blank as all conditions are now not met)?
@bernardwilliams4051
@bernardwilliams4051 11 жыл бұрын
As in your example, my vba worked perfectly. How do you get the Date into say cells J2 and O2 if this same type data was further over on the same worksheet?
@buyimfaiz
@buyimfaiz 9 жыл бұрын
VERY NICE Thank You Sir
@jamestorres2815
@jamestorres2815 9 жыл бұрын
Very helpful thank you
@Elegantez21
@Elegantez21 10 жыл бұрын
hi good video but if i dont want automatic if i want a series of buttons to add time,date and a new invoice number? please help and shome how
@hasibgns
@hasibgns 5 жыл бұрын
Your voice is same as Guruji from Sacred Games.
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
What's that?
@michalroesler
@michalroesler 4 жыл бұрын
thank you Dinesh
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You're welcome. Please share with your friends.
@joselicop872
@joselicop872 9 жыл бұрын
Hi! I found your video very useful to what I needed. I just want to know if there is a shortcut if I have around 71 cells to be completed with data and I need that cell to automatically have the date. Is there a shortcut because having to type codes for all 71 cells is a bit long. Thank you!
@ridumon6090
@ridumon6090 10 жыл бұрын
its helpful, Thanks a lot
@mayukhghosh2392
@mayukhghosh2392 9 жыл бұрын
Hi Sir, I want to view this macros recording later.Where is the data getting captured?
@bidyutkumar8764
@bidyutkumar8764 6 жыл бұрын
Hi, Thanks very good your halpfull video clip. Can you help me please. How fix Hijri to Gregorian calendar conversion each cell in excel ??
@upendarganji9568
@upendarganji9568 7 жыл бұрын
thank you very much sir.
@mariantonys
@mariantonys 4 жыл бұрын
Sir, where can I get a book 📚 on VBA programming for office 2007?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Try this: freecomputerbooks.com/Microsoft-Office-Excel-2007.html
@biswajitpal351
@biswajitpal351 2 жыл бұрын
Thank u sir 👍.
@Exceltrainingvideos
@Exceltrainingvideos 2 жыл бұрын
Most welcome
@odontologiauniversidadces164
@odontologiauniversidadces164 4 жыл бұрын
nice class, im not so good for excel!!
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
You can do it!
@UnresolvedStrings
@UnresolvedStrings 10 жыл бұрын
Sir is it possible to make the date and time non modifiable after once added by the operator so that they cannot modify it as per their need. Only administrator can modify. Is there any coding for that? Please suggest.
@carlosferreira7747
@carlosferreira7747 7 жыл бұрын
I have DTPicker in my form. When I running a macro de format is not date and tried differents way and I'm not able to format it. Can you could help me? tks Carlos
@Exceltrainingvideos
@Exceltrainingvideos 9 жыл бұрын
As I've pointed out many times, if you just copy and paste the macro code from my website, it may not work because characters like 'quotes' are different. So please check your code thoroughly before executing it.
@tieuthaihoa
@tieuthaihoa 9 жыл бұрын
+Dinesh Kumar Takyar Hi Dinesh ! when i use you this code then excel can't use function ctrl+z ,please help me fix this issue , thank you !
@ARYDigitalDollar
@ARYDigitalDollar 6 жыл бұрын
yes please help me same problem happen with my data sheet. undo Function not working.
@anthonyjohnson743
@anthonyjohnson743 11 жыл бұрын
What did you press after And cells to include cells A through E?
@ARYDigitalDollar
@ARYDigitalDollar 6 жыл бұрын
Hi Sir,i have to add same auto date functions in more colums, how can i add more macros in this entire Sheet to Mark date n time for more colums data. please help.
@patrickharris2804
@patrickharris2804 10 жыл бұрын
my entire column is updating the time and date. also, entering new data updates my entire date/time column instead of each column having its own time stamp. HELP????
@SamSam-lh8mn
@SamSam-lh8mn 7 жыл бұрын
If I have start and finish dates and when I update my schedule daily with blue colour in each cell ,I have to change the finish dates everytime. Iam wondering if there's somehow i can insert my colour for update and my finish date or start change based on date at first row . Thanks in advance
@Hamid_Aroob
@Hamid_Aroob 8 жыл бұрын
Dear mr. Dinesh, Thanks for that helpful info, Sir I need your help to have the time stamp when the date in the cell changed "if the cell not empty", How can I do That? Thanks in advanced, Hamid
@angelcarter270
@angelcarter270 5 жыл бұрын
Is there a way to use this same code for MULTIPLE columns? Can more than just columns A and E be used for this
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Try it out!
@angelcarter270
@angelcarter270 5 жыл бұрын
@@Exceltrainingvideos i did and i wasn't able to add additional columns
@angelcarter270
@angelcarter270 5 жыл бұрын
@@Exceltrainingvideos when I tried to add more columns (i need this to work for 4 additional columns), I kept getting compile errors and other errors as well.
@tanvirkhan3201
@tanvirkhan3201 9 жыл бұрын
Sir, i need both in time & arrival time. its possible in VBA? Like If i put a number then its shows in time, then after doing execution i put done, then its shows arrival time.
@amgmrahmanmizan5207
@amgmrahmanmizan5207 6 жыл бұрын
Hi sir, i have faced a problem with this VBA....i have done this task manually & its properly working.. But i protected the Worksheet when its not working,, Its says, 1004 error. So how can i fix up it!!?
@Gaminiheraliyawala
@Gaminiheraliyawala 9 жыл бұрын
Dear Sir, I tried with your codes exactly as you directed but was not successful, what could be the reason and How can I correct it? The code I have done is given below; Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 To 100 If Cells(i, "A").Value " " And Cells(i, "B").Value " " And Cells(i, "C").Value " " And Cells(i, "D").Value = " " Then Cells(i, "D").Value = Date & " " & Time Cells(i, "D").NumberFormat = "m/d/yyyy h:mm AM/PM" End If Next Range("D:D").EntireColumn.AutoFit End Sub I appreciate if you could help me understand the error I have done Best regards, Gamini
@robertolaffoon5521
@robertolaffoon5521 9 жыл бұрын
This is the code im using; Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 8 To 1200 If Cells(i, "B").Value "" Then Cells(i, "G").Value = Time Cells(i, "G").NumberFormat = "h : MM AM/PM" End If Next Range("E:E").EntireColumn.AutoFit End Sub Excel keeps showing "error 28" what sould be de problem??
@Linkonem
@Linkonem 4 жыл бұрын
Hello This code crashes under MS Excel 2016 for some reason, Checked in forums and people got the same issue with different codes when moving to an excel version to another Why is that?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
This link will help: www.exceltrainingvideos.com/automatic-date-time-entry-using-excel-vba/
@SatishGlimpse
@SatishGlimpse 5 жыл бұрын
Hello Dinesh. I have tried the above the code to get the date and time auto populate using the code. can i lock the E column with password. When i try to do that using protect sheet it shows error. How i do that in codes. Pls reply i'm waiting
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will guide: www.exceltrainingvideos.com/tag/automatically-lock-worksheet-cells-after-data-entry-using-vba/ Or search www.exceltrainingvideos.com
@jessa.v
@jessa.v 8 жыл бұрын
hi mr. dinesh. I would like to ask for your help because i keep getting run-time error '13' type mismatch. and it points out to this in the vba: If Cells(i, "D").Value "" And Cells(i, "E").Value "" And Cells(i, "F").Value "" And Cells(i, "G").Value = "" Then i have no idea where the problem is. i'm not an IT person. i hope you can help me. i'm doing this for our seminar registration sheet so that the time they logged can be recorded automatically as soon as they typed their names. thank you! :)
@Exceltrainingvideos
@Exceltrainingvideos 8 жыл бұрын
Have a look at this link: www.exceltrainingvideos.com/automatic-date-time-entry-using-excel-vba/ Of course you can also do a search at: www.exceltrainingvideos.com
@jessa.v
@jessa.v 8 жыл бұрын
thank you so much for responding mr. dinesh. I will get back to you if i've been successful. :)
@SivavenkataGanesh
@SivavenkataGanesh 7 жыл бұрын
if i change the date in the excel sheet remaining all the page formulas should be updated according to the date what is the formula
@alifuddin65
@alifuddin65 7 жыл бұрын
hi dinesh, need some help. I have the basic understanding of how this works. HOwever what i require is multiple time stamps in multi[ple cells. Again the date and time stamp should only appear if the specified cell has data input. e.g. A2 = Apple B2 = Date, C2 = OUT of STOCK - D2 = date etc. Please help. thank you.
@kamalhussain725
@kamalhussain725 9 жыл бұрын
Hi, I copied the VBA code from your website but for some reason the date & time is not being stamped after completing values on the cells, there is no error msg either, can you please advise if I am doing anything incorrectly? thank you
@finkenstrudle
@finkenstrudle 9 жыл бұрын
Kamal Hussain Same problem here, I also copied the code from the website but nothing happens :-(
@prabirbiswas2052
@prabirbiswas2052 5 жыл бұрын
I urgently need the VBA Script to make Date and Time Stamping automatically. regards,
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link should help: www.exceltrainingvideos.com/automatic-date-time-entry-using-excel-vba/
@ahmedkidwany2591
@ahmedkidwany2591 7 жыл бұрын
Amazing!!
@biswajitdebnath5372
@biswajitdebnath5372 5 жыл бұрын
Sir, May you help me for saving and updating a date column in excel worksheet with date format as "DD/MM/YYYY" through Excel user form even system date format setting in US Date format.
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Try this code: Range("A1").NumberFormat = ("dd - mm - yyyy") This link will help: www.exceltrainingvideos.com/format-dates-in-excel-with-vba/
@saifhamza4785
@saifhamza4785 10 жыл бұрын
sir what i wonder if can i put the date of modifying of an existing data at each change
@VaricoseVeinsClinic1
@VaricoseVeinsClinic1 5 жыл бұрын
Dear Sir, I am trying to build a DIAGNOSTIC CENTRE MANAGEMENT SOFTWARE in Excel userform VBA. In that I have a List box with 7 columns and over 1000 rows of data. I want your help in editing an individual cell of a column say column 7, multiple rows that are a part of a group i.e Biochemistry investigations in column 7 sfter selecting Biochemistry form a drop down list. This group Biochemistry contains about 500 rows. I should also be able to select all in the BIOCHEMISTRY group and set a uniform value for all those investigations in column 7 or for individual cells in column 7 I want to be able tro edit the column contents directly from the list box. Can you please help. Regards
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Search www.exceltrainingvideos.com/ step by step. I would suggest you think through the solution again step by step and write those steps.
@LUCKY007725
@LUCKY007725 6 жыл бұрын
Nice Tutorial it was very useful for one of my project but i need infinity value as you used i = 2 to 100...i need infinity instead of 100... please guide me Regards
@joanll7196
@joanll7196 7 жыл бұрын
I need help, how can I do to, when I click in a check-box automatically apears the exact date of the moment when I clicked on the check-box?? Thanks
@wayneseymour1
@wayneseymour1 6 жыл бұрын
is there a DTPicker for excel 2016 using windows 10 64 bit?
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
No.
@Dammac80
@Dammac80 8 жыл бұрын
Thank you so much!!! :)
@iballistictiger3000
@iballistictiger3000 6 жыл бұрын
I need help my scenario: I will scan a badge id(barcode) and the output will appear on the cell. However, the barcode I scanned will give me numbers as the output. How can I automatically change the numbers into the person's name ? hope you understand my question :)
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
No idea.
@iamteeten
@iamteeten 4 жыл бұрын
What if I wanted to put an end time to column F? Like there's a start time and end time to each row. But I don't want to click on any buttons, just automatically gives me the time I started and finished doing the task in 1st row?
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
The link to this VBA tutorial will help: www.exceltrainingvideos.com/tag/timer-in-excel-using-vba/ When you have some data in the last used cell of row f, you can call the end timer.
@iamteeten
@iamteeten 4 жыл бұрын
Thank you for your response. 😊 How about a time and motion file without the need to add buttons for start timer and stop timer. The VBA that automatically starts the time when i enter something at column A2 then stops the timer when I enter something in A3. 😊 sorry newbie here.
@b.pranjoy
@b.pranjoy 3 жыл бұрын
if possible that i want automatic generate retirement date while entry data in excel vba
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
These Excel tutorials will help: www.exceltrainingvideos.com/date-functions/ www.exceltrainingvideos.com/subtract-dates-in-excel/
@haddmht3703
@haddmht3703 9 жыл бұрын
i have 2 problems that following:- - The vb always shows debugging error 438?!, and shows yellow highlight in sentence no3 "if Cells (i, "A")......etc" - When I put words in column D, it is refusing to show the date on cells of E Thanks
@wbrod1
@wbrod1 9 жыл бұрын
How can i fill to the last row 1048576
@sandeeprawat8497
@sandeeprawat8497 3 жыл бұрын
Please help. How to use time criteria while extracting email from Outlook in Excel.
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Search my channel using 'time' as keyword.
@sandeeprawat8497
@sandeeprawat8497 3 жыл бұрын
Not able to find . Please help
@ems571
@ems571 5 жыл бұрын
Hi, why does my date still changes when I enter data on the next row?
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Share your code.
@limalvineo3810
@limalvineo3810 4 жыл бұрын
same here
@user-oe3eb7ix8u
@user-oe3eb7ix8u 9 жыл бұрын
This Code worked but it kept showing error in the Cells(i, "AD").NumberFormat = "m/d/yyyy h:mm AM/PM" and is asking to debug the same.
@j53iliff2
@j53iliff2 7 жыл бұрын
I love you Dinesh Kumar Takyar!
@Emontami
@Emontami 10 жыл бұрын
Hi Sir, Thanks for help I done it but I have a problem. When I make a file Visual Basic & I edit worksheet and is change automatic time & date but when I close this file and I open again this file than is not change automatic time & date so I need edit again Visual Basic. Please help me to do how I can get one worksheet file change automatic time & date without edit all time Visual Basic. Thanks
@materenemolaoa1752
@materenemolaoa1752 6 жыл бұрын
What if I want to call date and time from a function? For example, when preparing the invoice immediately when I open my document the today's date &time appears? and would be stored with the invoice
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
This lin will help: www.exceltrainingvideos.com/how-to-auto-run-vba-project-when-excel-workbook-is-opened/ To enter date and time in let's say Range A1 you would add the code: Range("A1").value=Date & " " & Time
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
link
@dipan901
@dipan901 7 жыл бұрын
can u plz tell me how to make a list of pdf which store in my pc and copy them in a pen drive
@Exceltrainingvideos
@Exceltrainingvideos 7 жыл бұрын
Search www.exceltrainingvideos.com or watch my latest video.
@narayan.gahan.9
@narayan.gahan.9 3 жыл бұрын
Sir after close the file after again open and work on sheet it's not working I want keep it permanent. if any salutation there please repaly
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Try again
@rik1994r
@rik1994r 7 жыл бұрын
thank you !!
@barmasudheer
@barmasudheer 6 жыл бұрын
Hi Dinesh, I Had Made Code Seeing Your Video as Per My Requirement.. But I Am Getting Error of "Out of Stack Space" "Run Time Error 28" Kindly Pls Help on Same.. Below is The Code Which I Had Entered in VB Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 To 100 If Cells(i, "D").Value = "Start" And Cells(i, "D").Value = "Start" Then Cells(i, "F").Value = Date & "" & Time Cells(i, "F").NumberFormat = "m/d/yyyy h:mm AM/PM" End If Next Range("F:F").EntireColumn.AutoFit End Sub
@Exceltrainingvideos
@Exceltrainingvideos 6 жыл бұрын
Check against this link: www.exceltrainingvideos.com/automatic-date-time-entry-using-excel-vba/
@pucca9090
@pucca9090 8 жыл бұрын
Firstly, I want to say Thanks for useful video. Secondly, I still can't use your code. When I apply your code below, I get a message: "Run-time error '-2147417848 (80010108)': Method 'Value' of object 'Range' failed" What should I do? Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 To 100 If Cells(i, "A").Value "" And Cells(i, "B").Value "" And Cells(i, "C").Value "" And Cells(i, "D").Value "" Then Cells(i, "E").Value = Date & "" & Time Cells(i, "E").NumberFormat = "M/D/YYYY H:MM AM/PM" End If Next Range("E:E").EntireColumn.AutoFit End Sub
@suvendunandy1006
@suvendunandy1006 8 жыл бұрын
+Quynh Nguyen I am also facing same issue Mr. Dinesh please help
@venusflytrap909
@venusflytrap909 8 жыл бұрын
if i type Time it keeps changing to TIME (Capitals) - any ideas why ?
@Cupids-lx5xj
@Cupids-lx5xj 5 жыл бұрын
The code work BUT i had to delete the timestamp in order to update.. cant it auto update when any cell had make a change (e.g if tht cell got edited)?
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Use worksheet 'change' event.
@atetissha
@atetissha 10 жыл бұрын
When I save and close it then open it again I can no longer see the timestamp when I enter into an empty cell?
@franklinbabuparaiayyar6494
@franklinbabuparaiayyar6494 3 жыл бұрын
Sir! This is Franklin. I'm not a CS student. But I'm interested in developing software program for bill for my medical store. Somehow, by watching videos of VBA code, I developed bill. But I can't write coding for expiry date. If I enter number format with four digit like 0121, it should be entered as mm/yy that 01/21. Pl. help me to do. Thank you Franklin
@Exceltrainingvideos
@Exceltrainingvideos 3 жыл бұрын
Please search my channel using the keyword 'dates' or 'date' to discover at least 10 videos on this topic in Excel and find a solution.
@franklinbabuparaiayyar6494
@franklinbabuparaiayyar6494 3 жыл бұрын
Thank you
@joelmarable2574
@joelmarable2574 9 жыл бұрын
I copied the VBA from your website and changed a few things. I didn't want to display the time entry so i took that out. Also i changed the ""And Cells" around since my date is in column A instead of column E. My question is; my code seems to work fine on row 2 but when i input my data in the last column on row 3 or higher the computer starts to think and causes excel not to respond. Please help.
@LinaBronco
@LinaBronco 7 жыл бұрын
Joel Marable I'm having same problem. Excel 2010
@myeasir826
@myeasir826 6 жыл бұрын
Me also
@rizwanmunich
@rizwanmunich 5 жыл бұрын
Same Problem here! any Tipp and solution ?
@shanedeacon8946
@shanedeacon8946 10 жыл бұрын
Mine just keeps refreshing the whole column to the current time and date?
@ulrichetoma3156
@ulrichetoma3156 5 жыл бұрын
same as me. Please did you find a solution?
@sethroberts1348
@sethroberts1348 8 жыл бұрын
When I run this code (see below) it works but it keeps changing every time to the new time. I need it to only update ether new column what am I doing wrong? For i =2 to 1000If cells (I, "B").value ""ThenCells (i, "D").Value = TimeCells(i, "D").numberformat = "h:mm:ss AM/PM"End ifNext i
@DieterReimann
@DieterReimann 7 жыл бұрын
You need to check the condition, if the receiving field "is empty" ( ="" not "")
@ezazmmashraken8252
@ezazmmashraken8252 8 жыл бұрын
is it possible without VBA?
@saidammabejjam278
@saidammabejjam278 4 жыл бұрын
In first sheet date automatically change then second sheet another column every day and sate wise rows with data change but how
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Search www.exceltrainingvideos.com/ or this channel goo.gl/5Jx1NP
@stephenessilfie1196
@stephenessilfie1196 5 жыл бұрын
Please I want to automatically insert the date and time in about five cells. Currently I can only do for two cells. Please help me out
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
Sub enterDateTime() Dim cel As Range For Each cel In Range("A1:A5") cel.Value = Now Next End Sub
@ראבןדג
@ראבןדג 10 жыл бұрын
hello sir, i really loved and used this post, ,my quetion is, and i will be happy if you can answer me , you give us the "if" rulls will happend so i will receive the date and time in the choosen cell, but what if i deleted the information in those cells,? how can? or what is the code need to add so the date and time will delete also as it has added when the cells were filled with data? i hope i am clear, i will explain agian my self .When the condition is met, then I get as a result the date, but I want that as soon as the condition is not met that the situation will return to normal and the date will be also deleted or will be written something like "choose date", maybe it's need to add "if else" or "else" function for that?
@rishabhdhiman6226
@rishabhdhiman6226 5 жыл бұрын
What if I want to update my previous cell which already has date and time. . . . ???
@Exceltrainingvideos
@Exceltrainingvideos 5 жыл бұрын
This link will help: www.exceltrainingvideos.com/update-record-in-database-automatically/ Or search www.exceltrainingvideos.com
@TAKFUJIWARA29
@TAKFUJIWARA29 7 жыл бұрын
Can do yo u have the maximize version of this video
@Exceltrainingvideos
@Exceltrainingvideos 7 жыл бұрын
This link might help: familycomputerclub.com/auomatic-date-time-entry-excel-vba.html
@d-cadengineeringsoftware6619
@d-cadengineeringsoftware6619 7 жыл бұрын
it's not working this code is the same as now function
@upendarganji9568
@upendarganji9568 7 жыл бұрын
hi sir, can you give me a solution for the following problem. there is a list of items. start started starting to be started how many items are there starting with "start"? the formula countif(a2:a5,"*stat*") showing 4 items as answer. but there are only 3 items, how can I get the exact answer. please suggest me in this regarding.
@Exceltrainingvideos
@Exceltrainingvideos 7 жыл бұрын
Filter and count.
@senhor5685
@senhor5685 7 жыл бұрын
This video time: 4:41, what I have to write if I don't want the value is "not equal to empty", how I key in the specific value in code?
@Exceltrainingvideos
@Exceltrainingvideos 7 жыл бұрын
If x=5 then Alternatively do a search at www.exceltrainingvideos.com You may also like to invest in a good Excel book: Excel 2016 Power Programming with VBA: amzn.to/2kDP35V If you are from India you can get this book here: amzn.to/2jzJGqU
@ambujbhardwaj7576
@ambujbhardwaj7576 4 жыл бұрын
I don't want to change the date every time. Because date should be static at the time of entry.
@Exceltrainingvideos
@Exceltrainingvideos 4 жыл бұрын
Initialize the date to the value you need.
@beautifulmind1082
@beautifulmind1082 9 жыл бұрын
Hi good day! i found your video and got interested to it. I used the code and modified some of its variable but when testing, it works on the 2nd row but hangs on the 3rd row of excel. is there a missing code that cause issue? thanks in advance.! :) here's the code : Option Explicit Private Sub Worksheet_Change(ByVal Target As Range) Dim i As Integer For i = 2 To 100 If Cells(i, "C").Value "" And Cells(i, "D").Value "" Then Cells(i, "B").Value = Date & " " & Time Cells(i, "B").NumberFormat = "m/d/yyyy h:mm AM/PM" End If Next Range("B:B").EntireColumn.AutoFit End Sub Private Sub Worksheet_SelectionChange(ByVal Target As Range) End Sub
@Exceltrainingvideos
@Exceltrainingvideos 9 жыл бұрын
+Beautiful Mind Instead of If Cells(i, "C").Value "" And Cells(i, "D").Value "" ThenuseIf Cells(i, "C").Value "" And Cells(i, "D").Value "" And Cells(i, "B") = "" Then
@beautifulmind1082
@beautifulmind1082 9 жыл бұрын
+Dinesh Kumar Takyar Hi... Amazing! it works... Thank you Thank you Thank you....God bless you! :) Thanks Dinesh.
@rickc2394
@rickc2394 10 жыл бұрын
Hi, I have learned a lot from your videos, and want to thank you: however, I am having one issue. I've am using VBA to transfer data from the Data Entry Sheet to a log sheet. Everything is transferring over correctly except for the. time. Example: I imput the name, route number, and start time. The name and route number transfers over correctly but the time transfers over as a DATE and Time. I input 2:00 PM and when I click the button 1/19/1900 12:00 is transferred but I need the 2:00 Pm to transfer. can you help me?
@Exceltrainingvideos
@Exceltrainingvideos 10 жыл бұрын
You are not supposed to make any input! The date and time is taken automatically from the system.
@rickc2394
@rickc2394 10 жыл бұрын
Okay, but I don't want the time from the system, I want the time I have assigned, is it possible?
@Exceltrainingvideos
@Exceltrainingvideos 10 жыл бұрын
Patrick Chung www.exceltrainingvideos.com/time-functions/
@geraldvinuya9237
@geraldvinuya9237 7 жыл бұрын
can you help me? how can add auto 15days, like for example today is 15 i like to auto + 15 days then will see 30
@Exceltrainingvideos
@Exceltrainingvideos 7 жыл бұрын
In a worksheet: =DATE(YEAR(A2),MONTH(A2), DAY(A2+15)) The date is in cell A2. In VBA: “=DATE(YEAR(RC[-1]),MONTH(RC[-1])+1,DAy(RC[-1]+15))” R=row C=column, negative value means to the LEFT. The date is one column to the LEFT. www.exceltrainingvideos.com/convert-date-formats/
Create a Date & Time Stamp in Excel Using VBA
12:15
HowtoExcel.net
Рет қаралды 2,2 М.
Record Date and Time when Cell Value is Changed using Excel VBA
8:32
Dr. Todd Grande
Рет қаралды 53 М.
Find Next Empty Row for Data Entry using Excel VBA
10:55
Dinesh Kumar Takyar
Рет қаралды 172 М.
The Ultimate Guide to Copying Data using Excel VBA
31:05
Excel Macro Mastery
Рет қаралды 68 М.
Unlock Excel Secrets: Magic Search Bar You NEVER Knew About!
17:59
PK: An Excel Expert
Рет қаралды 533 М.
How to transfer data from one workbook to another automatically using Excel VBA
14:30
Automatically Timestamp Data Entries in Excel
16:44
TeachExcel
Рет қаралды 188 М.
Datediff in VBA - Calculate difference in years, months and days etc.
8:43
VLOOKUP Using VBA
21:23
Dinesh Kumar Takyar
Рет қаралды 302 М.
Smart Attendance Manager in Excel VBA
1:21:25
PK: An Excel Expert
Рет қаралды 176 М.