Auto fill in and update current date and time whenever certain cells are filled

Danisioni

New Member
Joined
Feb 6, 2022
Messages
8
Office Version
  1. 2019
Platform
  1. MacOS
Excel sheet-testing 7.xlsx
ABCDEFG
1DAYDATADATE/TIME
2DAY 1cell B2cell C2cell D2cell E2cell G2
3DAY 2auto-fill dd/ hh:mm:ss
4DAY 3auto-fill dd/ hh:mm:ss
5DAY 4auto-fill dd/ hh:mm:ss
Testing 2


Hi, can anyone help me get this done?

I need Excel to automatically FILL-IN and UPDATE the current Date & Time (dd/ hh:mm:ss) in cell G2, whenever any of the "DATA" cells (B2 to E2) in row 2 (Day1) is FILLED, (regardless of whether one of the other cells in the same row has already been filled).
Note 1: The same should apply for each of the rows below (day 2, day 3.. and so on infinitely).
Note 2: Filling or updating the "DATA" cells from one of the rows should NOT change/update the "DATE/TIME" cell from the other rows (above or below).
Note 3: If all the "DATA" cells of one row are empty then also the DATE/TIME cell of that row will remain empty.

Thanks
 
That was my mistake, corrected here I hope.
Manually correcting the time works now. Thanks!

Suppose cell F6 is blank on day 1, filled in with a value on day 2, cleared on day 3 and a value entered on day 4. Do you consider F6 to be filled in for the first time on day 4 or not?
This scenario is highly unlikely.
let’s take a step back.

Here is what would work for me:
1. I need the Date/Time cell to fill in the time whenever one new empty Data cell is filled for the first time (what happens to that cell after that does not matter. The time is freezed).
2. I should be able to edit a value in one of the filled cells (in case I mistakenly filled-in the wrong number) without the time updating.
3. Deleting a cell is unlikely, but in case that happens I would like that the time remains unchanged as well.
4. If ALL cells of that day are empty or go empty as a result of deleting one or more cells then the Date/Time cell will obviously be empty too.

Let me know if you have more questions.

In relation to undo, any work-around I think would be very difficult.
Ok.

In relation to match formatting, if the formatting in columns E:H is uniform and you always want to "match destination formatting" then the code could do that, either ..
- by copying the formatting from a dummy hidden row, or
- by applying the various formatting components directly, or
- as I mentioned before, use Paste Special - Values in the first place
Yes I always want to "match destination formatting.
I tried “Paste Special” - It does not show me "Value". It shows me: “HTML”, “Unicode text” and “Text”. - "Text" seems to do the trick.
I also tried changing formats and adding conditional formatting and everything seems to work well without creating problems to the code or the sheet.

If you want to keep all the paste options available after the paste has taken place then I don't think that will be possible with the code
Thats ok, I will use the "Paste Special" option.

Thanks again.
 
Upvote 0

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.

Forum statistics

Threads
1,223,892
Messages
6,175,236
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top