Skip to main content

VBA excel automatic date when value add

 In Microsoft Excel, you can use Visual Basic for Applications (VBA) to automatically enter a date in a cell when a value is added. Here's an example of how you can do this: Press Alt + F11 to open the VBA editor. Right-click the sheet tab where you want to add the date, then select "View Code". In the code editor, paste the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A1:A10")) Is Nothing Then Target.Offset(0, 1).Value = Date End If End Sub Close the code editor by clicking the "X" in the top-right corner. This code will automatically enter the current date in the cell next to the active cell whenever a value is added in the cells from A1 to A10. If you want to change the range of cells, you can modify the range in the line "If Not Intersect(Target, Range("A1:A10")) Is Nothing Then". Note: This code works in all recent versions of Micr...

Excel versions list

Excel is a spreadsheet program that is part of the Microsoft Office suite of productivity tools. There have been many versions of Excel released over the years, with each new version introducing new features and improvements. Here is a list of some of the major versions of Excel:


  1. Excel 1.0: This was the first version of Excel, released in 1985 for the Macintosh.

  2. Excel 2.0: This version, released in 1987, added support for Windows and improved the user interface.

  3. Excel 3.0: This version, released in 1990, added support for macros and introduced the PivotTable feature.

  4. Excel 4.0: This version, released in 1992, added support for international versions and improved the charting capabilities.

  5. Excel 5.0: This version, released in 1993, introduced support for the Windows 95 operating system and added new features such as data validation and custom views.

  6. Excel 95: This version, released in 1995, added support for the Windows 95 operating system and introduced new features such as data tables and the Scenario Manager.

  7. Excel 97: This version, released in 1997, added support for the Internet and introduced new features such as data consolidation and pivot charts.

  8. Excel 2000: This version, released in 1999, added support for XML and introduced new features such as web queries and data forms.

  9. Excel 2002: This version, released in 2001, introduced new features such as data validation, error checking, and protection options.

  10. Excel 2003: This version, released in 2003, introduced support for the Windows XP operating system and added new features such as the ability to print gridlines and comments.

  11. Excel 2007: This version, released in 2007, introduced a new ribbon interface and added new features such as support for Office Open XML and sparklines.

  12. Excel 2010: This version, released in 2010, introduced new features such as support for Slicers and improved data visualization tools.

  13. Excel 2013: This version, released in 2013, introduced new features such as support for touch devices and improved data analysis tools.

  14. Excel 2016: This version, released in 2015, introduced new features such as support for data modeling and improved data visualization tools.

  15. Excel 2019: This version, released in 2018, introduced new features such as support for new functions and improved data analysis tools.

These are some of the major versions of Excel that have been released over the years. As you can see, Excel has evolved significantly over time, with each new version introducing new features and improvements. 

Comments

Popular posts from this blog

Multiple Find and Replace word document using VBA

On the File tab, go to Options > Customize Ribbon. Under Customize the Ribbon and under Main Tabs, select the Developer check box. After you show the tab, the Developer tab stays visible, unless you clear the check box or have to reinstall a Microsoft Office program. The Developer tab is the place to go when you want to do or use the following: 1. Write macros. Sub ReplaceFromTableList() Dim oChanges As Document, oDoc As Document Dim oTable As Table Dim oRng As Range Dim rFindText As Range, rReplacement As Range Dim I As Long Dim sFname As String 'Change the path in the line below to reflect the name and path of the table document sFname = "C:\Users\admin\Documents\FindReplaceTable.docx" Set oDoc = ActiveDocument Set oChanges = Documents.Open(FileName:=sFname, Visible:=False) Set oTable = oChanges.Tables(1) For I = 1 To oTable.Rows.Count Set oRng = oDoc.Range Set rFindText = oTable.Cell(I, 1).Range rFindText.End = rFindText.End - 1 Set r...

VBA excel automatic date when value add

 In Microsoft Excel, you can use Visual Basic for Applications (VBA) to automatically enter a date in a cell when a value is added. Here's an example of how you can do this: Press Alt + F11 to open the VBA editor. Right-click the sheet tab where you want to add the date, then select "View Code". In the code editor, paste the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub If Not Intersect(Target, Range("A1:A10")) Is Nothing Then Target.Offset(0, 1).Value = Date End If End Sub Close the code editor by clicking the "X" in the top-right corner. This code will automatically enter the current date in the cell next to the active cell whenever a value is added in the cells from A1 to A10. If you want to change the range of cells, you can modify the range in the line "If Not Intersect(Target, Range("A1:A10")) Is Nothing Then". Note: This code works in all recent versions of Micr...

Snake game using Javascript

Here is an example of a basic snake game using JavaScript: // canvas setup var canvas = document.getElementById("snake-game"); var ctx = canvas.getContext("2d"); // game variables var snake = [{x: 150, y: 150}]; var direction = "right"; var foodX = Math.floor(Math.random() * canvas.width); var foodY = Math.floor(Math.random() * canvas.height); var score = 0; // game loop setInterval(function() {   // clear the canvas   ctx.clearRect(0, 0, canvas.width, canvas.height);   // draw food   ctx.fillStyle = "red";   ctx.fillRect(foodX, foodY, 10, 10);   // move snake   var head = {x: snake[0].x, y: snake[0].y};   if (direction === "right") {     head.x += 10;   } else if (direction === "left") {     head.x -= 10;   } else if (direction === "up") {     head.y -= 10;   } else if (direction === "down") {     head.y += 10;   }   snake.unshift(head);   // check for collision with food ...