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
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Would you please give me the exact name of the three sheets

Like:
Sheet named "One"
Sheet named "Two"
Sheet named "Three"

And you are wanting the entire row on sheet "One" copied to Sheet("Two") and Sheet("Three")

Well since we would need to know when exactly the row on Sheet "One" is ready to be copied

How about when you double click on cell in Column (1) then that row is copied to other sheets.
Would that work for you?
If you do not like this plan then explain when exactly the script will know when the row to be copied is completed and ready to be copied.

And why does your Title Subject say:
Fill cell column with current date

Fill what cell column with current date ?

 
Last edited:
Upvote 0
Thanks for your reply.

1. Lets name sheet one as Data Entry. This sheet is completed every time when there is a new business proposal.
2. Lets name sheet two as Quote Form. This sheet is auto populated from sheet one to create a quotation for the customer. (This is ok to do).
3. Lets name sheet three as Register. This sheet is also auto populated from sheet one as well but in a register form, meaning one entry after another.

Everytime sheet one is filled, the next row is auto populated in register.

If say, A2 in Data Entry holds a date. When a date is entered, A2 in register is auto populated. If A2 is again entered in Data Entry, then A3 in the registry is fill automatically and so forth.

Hope this is helpful.

Bluwara
 
Upvote 0
I was thinking you wanted the entire row copied.
Because you said this in your first post:

So every time when the data entry spreadsheet is filled, the
next row
in the register is filled as well.

So you mean next cell

Try this:
This is an auto sheet event script
Your Workbook must be Macro enabled
To install this code:
Right-click on the sheet tab named
Data Entry
Select View Code from the pop-up context menu
Paste the code in the VBA edit window

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Modified  10/8/2018  12:13:36 AM  EDT
If Not Intersect(Target, Range("A:A")) Is Nothing Then
If Target.Cells.CountLarge > 1 Or IsEmpty(Target) Then Exit Sub
Dim Two As String
Dim Three As String
Dim ans As Long
ans = Target.Row
Two = "Quote Form" 'Modify sheet name if needed
Three = "Register"  'Modify sheet name if needed
Dim Lastrowa As Long
Lastrowa = Sheets(Two).Cells(Rows.Count, "A").End(xlUp).Row + 1
Dim Lastrowb As Long
Lastrowb = Sheets(Three).Cells(Rows.Count, "A").End(xlUp).Row + 1
Target.Copy Sheets(Two).Cells(Lastrowa, 1)
Target.Copy Sheets(Three).Cells(Lastrowb, 1)

End If
End Sub
<strike>
</strike>
 
Last edited:
Upvote 0
I'm still a little confused as if you want the entire row copied or just the cell value in column A

In one place you say Row
And another place you say A2
A2 is a cell not a row

A row would be copy Row(3)
Meaning every thing in that row.

You said:
If A2 is again entered in Data Entry, then A3 in the registry is fill automatically and so forth.

But you also said this:
Everytime sheet one is filled, the next row is auto populated in register.

Next row means the entire row.

Here you did not say Next cell.

Try my script and see if it does what you want.

<strike>
</strike>
 
Last edited:
Upvote 0
Sorry about that. Let me try again.

Lets just focus on 2 spreadsheets only.

1. Data Entry
2. Register

Data Entry is always completed when there is a new proposal. Same spreadsheet completed everytime. In the spreadsheet, Cell (C5) is a date cell. When this cell is filled every time, the register is updated.

In the register spreadsheet, column A is the column to auto fill the cell result from Data Entry. When cell (A2) in the Register is fill, the next data to fill will be cell (A3). When cell (A3) is filled, cell (A4) and so on....bearing in mind that the result is coming from the cell (C5) in the Data Entry spreadsheet.

Bluwara
 
Upvote 0
Can you show me in post 1 or Post 3 where you said anything about C5
So are you saying when you manually enter a value in C5 of The Data Entry sheet you want the script to run.

I see nothing mentioned about C5
 
Last edited:
Upvote 0
The mentioned cells are examples.

Yeah...I want the script to run if the cell in Data Entry is filled.

Bluwara
 
Upvote 0
Well when you want a script to automatically run when a cell has data entered you have to specify what cell.
Or you can say any cell in column A or any cell in column B.

But I know of no way to a have a script run when some data is entered into any cell.

But maybe someone else on this forum will be have a answer.
 
Upvote 0
I think the OP is saying if they enter a date in C5 on Data Entry they want that date to go in the next row in column A on sheet Register.
 
Upvote 0

Forum statistics

Threads
1,214,827
Messages
6,121,824
Members
449,050
Latest member
Bradel

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