Fill cell column with current date

Bluwara

New Member
Joined
Nov 7, 2017
Messages
27
Morning All,

I need your help on my query. This is my query.

I have 3 spreadsheets in a workbook which the first spreadsheet is the data entry spreadsheet and the other is the quotation form to fill automatically from the details from the first spreadsheet. The 3rd spreadsheet is my register.

The register must also auto complete when when the data entry spreadsheet is filled. So every time when the data entry spreadsheet is filled, the next row in the register is filled as well.

My issue is on the date column of my register where I am finding it difficult to fill in the current date automatically when the data entry spreadsheet is filled for each row in the register.

Hope this is clear.

Thanks in advance...

Bluwara
 
If you enter say data in Cell C5 in Data Entry, you can do a formula in A2 in the Register as "=DataEntry!C5" to place the data in C5 to A2 in the Register.

But bcoz I am using the same spreadsheet for all my new entries, I am unable to use the earlier mentioned formula coz it won't work as required.

So I want help when I enter data in C5, A2 is filled and when C5 data is entered again, A3 is now filled as A2 was filled previously and so on.

Bluwara
 
Upvote 0

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Code to go in the worksheet module of sheet Data Entry.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("C5")) Is Nothing Then
        If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
        Target.Copy Sheets("Register").Cells(Rows.Count, "A").End(xlUp)(2)
    End If
End Sub
 
Upvote 0
Morning Mark858,

The formula works as requested but it is copying the details with all its settings and pasting it on the register. How can I amend to show the value only with the settings details.

Bluwara
 
Upvote 0
First of all it is not a formula, it is VBA code. Anyway try the code below...

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("C5")) Is Nothing Then
        If Target.Cells.Count > 1 Or IsEmpty(Target) Then Exit Sub
        Sheets("Register").Cells(Rows.Count, "A").End(xlUp)(2).Value = Target.Value
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,473
Messages
6,130,837
Members
449,597
Latest member
buikhanhsang

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