How to add new row each day automatically?

viktor_david

New Member
Joined
Mar 16, 2017
Messages
29
Hi,

I have the following problem:
I want a way that tomorrow there is a new Row (thanks for correction,Joe4) automatically in my excel that shows the date and the price.
So today it shows like this:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD="align: right"]A[/TD]
[TD="align: center"]02.05.2017[/TD]
[TD]320[/TD]
[/TR]
[TR]
[TD="align: right"]B[/TD]
[TD="align: center"]01.05.2017[/TD]
[TD]310[/TD]
[/TR]
[TR]
[TD="align: right"][/TD]
[TD="align: center"][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


And tomorrow I want it to look like this without me having to insert a new row manually:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]1[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD="align: right"]A[/TD]
[TD="align: center"]03.05.2017[/TD]
[TD]315[/TD]
[/TR]
[TR]
[TD="align: right"]B[/TD]
[TD="align: center"]02.05.2017[/TD]
[TD]320[/TD]
[/TR]
[TR]
[TD="align: right"]C[/TD]
[TD="align: center"]01.05.2017[/TD]
[TD]310[/TD]
[/TR]
</tbody>[/TABLE]

How can I do this?
Note: I know nothing about VBA.

Is it faster for excel to open when it's filled with macros or when it's filled with formulas?

Thanks guys
 
Last edited:
The problem with that comes when days like yesterday happen. market wasnt open on a Monday.. but i can find solution if we can put numbers instead
 
Upvote 0

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Is it possible that instead of dates it inputs numbers? so basically A1 today is 0, yesterday's date is 1, before yesterday is 2. And tomorrow, tomorrow's date will be 0, today's date will be 1, yesterday's date 2, and before yesterday's date will be 3.
Is it possible?
The issue with that is when it opens the file tomorrow, how will it tell if that zero is from today or yesterday?
You would need to "capture" or store the date somewhere, so it knows if it already ran for the current date or not.

If you want something like what you are asking, I might recommend adding another column with the formula:
Code:
=ROW()-1
That will return 0 for row 1, 1 for row 2, etc.

By the way, I added code to my last post (don't know if you saw that).
 
Upvote 0
The problem with that comes when days like yesterday happen. market wasnt open on a Monday.. but i can find solution if we can put numbers instead
Not sure where you are located, but the markets were open here yesterday!;)
Is there any way to identify non-weekend dates when the markets are not open?
What does your formula in column B return in those instances?
Maybe we can have it automatically delete those rows, based on whatever it is you see in those instances.
 
Upvote 0
Yes, it copied/pasted the 2nd code and it runs smooth.. actually the holidays do not show blank, the show the previous price.. .so if the number one doesnt work, ill stay with the second you sent.
Let me try to do it...
Live saver, sir
 
Upvote 0
Actually I can work with second code, because there is no wway to identify those dates since they do not show blank, but show previous price.. but that is not a problem, I can work with that.. In any case, if that is a problem I will hit you up again with a question.
It is nice to get this help.
Thanks a lot sir, Have a great day...

OH i almost forget...
How excel gets slower? when filled with formulas or when filled with macros?
 
Upvote 0
Unless you have a ton of VBA code, it is is probably faster with the VBA code.

One possible solution to your holiday issue is to create a lookup list of all holiday dates. You could then have your VBA code check to make sure the date it is writing for is not found on that list.
 
Upvote 0
Hello, Sir

Sorry for not replying your last message. I did not see it.

I am looking to continue further with this project.
Are you available to help me a bit more with this, because that was the first part of the project hehe...
Maybe You have some free minutes?

Thanks
 
Upvote 0
If you have new questions (even if they are on the same project), please post them to a new thread. You would only post it to the same thread if it is a directly-related follow-up question that it is necessary for the people to see the previous responses in order to answer the new question.

That way, others will see that there is a new unanswered question. My time around here has been a bit limited lately.

Note that if you are looking for someone to help you with a project the whole way through, you may want to consider hiring a consultant. MrExcel does offer those services too: MrExcel.com | Excel Resources | Excel Seminars | Excel Products
 
Upvote 0

Forum statistics

Threads
1,223,905
Messages
6,175,297
Members
452,633
Latest member
DougMo

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