Use the fill handlerSelect the cell that contains the first date. Drag the fill handle across the adjacent cells that you want to fill with sequential dates, select the fill handle. In the lower right corner of the cell, hold and drag to fill in the rest of the series. The Stack Exchange network consists of 182 communities from the first quarter of 26A, including Stack Overflow, the largest and most trusted online community for developers to learn, share their knowledge and develop their careers.
Connect and share knowledge in a single, structured, easy-to-search location. I've tried to make it work using %3DTODAY () but I don't know how to structure the formula. I would say that the easiest way to do this would be with a user-defined function. That function will be updated when any cell it references changes, so you don't have to link it to any event.
After putting that code in a module in your workbook, you can simply enter %3DUpdating_date (B) in C5 and then copy it. That should cause the date in C5 to be updated every time the values in column C change. To make the date only appear if the cell in column B isn't blank, you can apply an if formula to the cell in column C, as I mentioned in the other question you asked. Just enter the same conditional that I showed there (i.e.
ISBLANK (B) and make the return value an empty string () if the condition is true and the UDF (Updating_Date (B) if the condition is false. This code must be placed in the VBA module of the worksheet where you want this behavior to occur. You can do it without VBA. I needed my column C to be completed with today's date based on column B and a value was entered.
This formula works to insert it correctly. I placed this in cell C2, since that's where I was starting for my column C. You can place it in the cell of the column where you are starting. Then, be sure to replace my B2 reference with the column and cell where your value is being entered.
For example, if your starting cell is F3, you should change the formula to say And if your corresponding date cell is K3, put the formula there. You can drag the formula to the rest of the cells in the column once you're in the first one. Once this value is entered, the date is added. If the value is deleted, Excel will automatically delete the date.
So it's not perfect, but if you need something more sophisticated, you probably need an Excel expert or a program to handle this for you. AFIK, you'll have to do it via VBA. You can create a function that observes the changes in your worksheet, filters only the changes in cells B5-B39, and updates the cells in C accordingly. The Target variable is now available, which is a reference to the cell that changes.
And press Ctrl-g to show the immediate window. Make some changes to the worksheet and return to the code, you will see that the data you entered appear in the Immediate window. Now change the code to say if Target. And you'll see a drop-down menu with the possible properties related to the Target variable.
Which now only prints changes in the range you are interested in. If you want to know how to change a value in a cell, you can record a macro of yourself doing it manually and examine the code. I hope you already have enough to continue. For more information, check out our tips on writing great answers.
To subscribe to this RSS feed, copy and paste this URL into your RSS reader. The code works fine, however, I only need one date cell currently in the entry B18 Private Sub Worksheet_Change (ByVal Target As Range) 'Auto Date' when the adjacent cell changes. Dim XCellColumn as an integer Dim XTimeColumn as an integer Dim XRow, XCol as an integer Dim XDPrg, XRg As Range XCellColumn %3D 14 XTimeColumn %3D Target, Row XCol %3D Target, Column if Target, Text “So if XCol %3D XcellColumn Then Cells (XRow, XTimeColumn) %3D Now () Else On Error Resume Next Set XdPrdPrg G %3D Objective, dependents for every XRg in XdPrg If XRg, column %3D XCellColumn Then cells (XRg, Row, XTimeColumn) %3D Now () End If Next End If End If End Sub Just hope someone knows the answer. Health How can you edit this code to check 3 or more columns for data entry instead of 1?.
ExcelDemy is a place where you can learn Excel and get solutions to your Excel %26, problems related to VBA, data analysis with Excel, etc. By setting up a Microsoft Excel spreadsheet that contains information about dates, you'll speed up the task if you let Excel do the tedious work of filling in columns of individual date entries. . .
Leave Message