Skip to main content

Posts

Showing posts from January, 2023

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   if (head.x === foodX &&

HTML code for Admin dashboard

  <!DOCTYPE html> <html> <head>   <title>Admin Dashboard</title> </head> <body>   <header>     <nav>       <ul>         <li><a href="#">Home</a></li>         <li><a href="#">Users</a></li>         <li><a href="#">Reports</a></li>         <li><a href="#">Settings</a></li>         <li><a href="#">Logout</a></li>       </ul>     </nav>   </header>   <main>     <h1>Welcome to the Admin Dashboard</h1>     <p>Here you can manage users, view reports, and update settings.</p>     <section>       <h2>Recent Users</h2>       <table>         <tr>           <th>Name</th>           <th>Email</th>           <th>Actions</th>         </tr>         <tr>

Windows shortcut keys

 Here are some common Windows shortcut keys: Windows key + E: Open File Explorer Windows key + R: Open the Run dialog box Windows key + L: Lock your computer or switch accounts Windows key + T: Cycle through apps on the taskbar Windows key + D: Show the desktop Windows key + P: Project to a different screen Windows key + Tab: Open the Task View Windows key + Ctrl + D: Create a new virtual desktop Windows key + Ctrl + Right arrow: Switch to the next virtual desktop Windows key + Ctrl + Left arrow: Switch to the previous virtual desktop Windows key + Ctrl + F4: Close the current virtual desktop Windows key + Alt + Tab: Switch between open apps Windows key + Shift + S: Take a screenshot (Windows 10 only) Ctrl + C: Copy Ctrl + X: Cut Ctrl + V: Paste Ctrl + A: Select all Ctrl + Z: Undo Ctrl + Y: Redo Ctrl + N: Open a new window or document Ctrl + W: Close the current window or document Alt + Tab: Switch between open windows or programs Windows key + D: Show the desktop Windows key + E: Open

What is Brand Marketing

Brand marketing is the process of building and maintaining a strong and recognizable brand. A brand is more than just a logo or a name, it is the perception that a customer has of a product or service. A strong brand can help to differentiate a company's offerings from its competitors and create a sense of trust and loyalty among customers. There are several key elements of brand marketing, including: Brand Identity: This includes the visual elements of the brand, such as the logo, color scheme, and typography, as well as the brand's name and tagline. Brand Strategy: This includes the overall positioning of the brand, the target audience, and the key messaging. Brand Communications: This includes the various tactics and channels used to communicate the brand, such as advertising, public relations, and social media. Brand Experience: This includes the overall customer experience, from the product or service itself to the customer service and support. Brand Management: This inclu

Sales promotion marketing

Sales promotion marketing refers to a variety of short-term incentives that are designed to encourage customers to make a purchase or take some other desired action. These incentives can include discounts, coupons, free samples, contests, and other similar promotions. Sales promotion marketing is often used as a complement to other forms of marketing, such as advertising and public relations, to increase sales and drive revenue. One of the key benefits of sales promotion marketing is that it can be used to drive short-term results. For example, a business may use a discount or coupon promotion to increase sales during a slow period, or to clear out inventory. Sales promotions can also be used to attract new customers, or to encourage repeat business from existing customers. There are several types of sales promotion strategies that can be used, including: Price promotions: This includes discounts, coupons, and other incentives that are based on price. Premium promotions: This includes

Excel Shortcut Keys

  Here are a few commonly used Excel shortcut keys: Ctrl + C - Copy Ctrl + V - Paste Ctrl + X - Cut Ctrl + Z - Undo Ctrl + Y - Redo Ctrl + F - Find Ctrl + A - Select all Ctrl + P - Print Ctrl + S - Save Ctrl + N - New Workbook Ctrl + B - Bold Ctrl + I - Italic Ctrl + U - Underline Ctrl + Home - Go to the beginning of the sheet Ctrl + End - Go to the end of the sheet Ctrl + Arrow key (up, down, left, right) - Move to the edge of the current data region F2 - Edit the active cell F5 - Go to a specific cell F11 - Create a chart of the selected data in a new sheet Note: These are just a few examples and Excel has many more shortcuts available Please watch video for more hidden shortcuts.

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: Excel 1.0: This was the first version of Excel, released in 1985 for the Macintosh. Excel 2.0: This version, released in 1987, added support for Windows and improved the user interface. Excel 3.0: This version, released in 1990, added support for macros and introduced the PivotTable feature. Excel 4.0: This version, released in 1992, added support for international versions and improved the charting capabilities. 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. Excel 95: This version, released in 1995, added support for the Windows 95 operating system and introduced new features such as data tables

Excel Vlookup and Hlookup

VLOOKUP and HLOOKUP are functions in Excel that allow you to search for a specific value in a table and return a corresponding value from a different column in the same row. VLOOKUP (vertical lookup) searches for a value in the leftmost column of a table and returns a value from a specified column in the same row. The syntax for the VLOOKUP function is as follows: =VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup]) lookup_value: the value you want to search for in the leftmost column of the table table_array: the table or range of cells containing the data you want to search col_index_num: the column number in the table from which you want to return a value (e.g., 2 for the second column) range_lookup: optional; if set to TRUE, VLOOKUP will perform an approximate match search; if set to FALSE, it will perform an exact match search For example, suppose you have a table with two columns: Name and Age. To use VLOOKUP to search for the age of a person with a specific name, y

Excel formula for attendance

There are many ways you can use formulas in Excel to track attendance. Here are a few examples: Counting the number of present days: To count the number of days a person is marked as present, you can use the COUNTIF function. For example, suppose you have a column for attendance status with "P" for present and "A" for absent. You can use the following formula to count the number of present days: =COUNTIF(A2:A31, "P") This formula will count the number of cells in the range A2:A31 that contain the value "P". Calculating attendance percentage: To calculate the percentage of days a person is marked as present, you can use the following formula: =(COUNTIF(A2:A31, "P") / (COUNTIF(A2:A31, "P") + COUNTIF(A2:A31, "A"))) * 100 This formula will count the number of "P" values and "A" values in the range A2:A31, and then calculate the percentage of "P" values. Highlighting absent days: To highlight