Jump to content

Macro In Excel


The Smith

Recommended Posts

Hi everyone,

 

I'm building a very simple agenda in Excel.

 

At the top, I wrote the date and Excel wrote the following ones for me, by dragging it.

 

But then I would like that when I open up the .xlsx doc, today's cell is already selected.

 

So I know this is done using a macro. I'm skilled(a bit) in VB.net, but I never done VBA programming so I just don't know how to start...

Share this post


Link to post
Share on other sites

  • Replies 35
  • Created
  • Last Reply

Top Posters In This Topic

It relies on your system clock, so be cautious about that one - it can screw up sometimes.

 

I remember doing this somewhere, but there is a function in Excel that will report today's date and time somewhere, so might be easier to have a hidden cell that auto-updates on opening the spreadsheet and perform some sort of lookup/concatenate on the various bits of data.

Share this post


Link to post
Share on other sites

It relies on your system clock, so be cautious about that one - it can screw up sometimes.

 

I remember doing this somewhere, but there is a function in Excel that will report today's date and time somewhere, so might be easier to have a hidden cell that auto-updates on opening the spreadsheet and perform some sort of lookup/concatenate on the various bits of data.

 

I know that one! :)

 

=TODAY()

 

or

 

=NOW()

Share this post


Link to post
Share on other sites

today() = Todays date

now() = date & time

Yup I knew that already. What I didn't was the concatenate part. I'll dig up the online help about that word.

 

Thanks!

Edited by The Smith

Share this post


Link to post
Share on other sites

Concatenate basically does this:

 

Imagine you have three cells. One says "Boobs" the second says "are" the third says "awesome", concatenate(cell1+cell2+cell3) ... and you get "Boobsareawesome" It shunts words together, but you can play around and separate words with spaces and so forth. Excel can do everything. It once did my laundry.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...