Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 12
Default Hard code date in excel . . .

I have a an excel workbook with 15 worksheets that I have to update the prior
month and current year on every month to produce a turnover report. Can I
use VB or a DATE function to do this?

I have tried =TEXT(TODAY(),"mmmm") but that only gives me the current month
and not the year. I need the prior month and current year.

Any help is appreciated!

Best,

Rachel Costanza
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default Hard code date in excel . . .

I don't know what you mean by hard code in this respect but this formula
will give you previous month and current year

=TEXT(DATE(YEAR(TODAY()),MONTH(TODAY()),0),"mmmm yyyy")

--


Regards,


Peo Sjoblom

"Rachel Costanza" wrote in
message ...
I have a an excel workbook with 15 worksheets that I have to update the
prior
month and current year on every month to produce a turnover report. Can I
use VB or a DATE function to do this?

I have tried =TEXT(TODAY(),"mmmm") but that only gives me the current
month
and not the year. I need the prior month and current year.

Any help is appreciated!

Best,

Rachel Costanza



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,344
Default Hard code date in excel . . .

Hi,

If all you need is to display the current year and prior month:
=EDATE(TODAY(),-1) displays the prior month when you format it to MMMM
(you don't need the TEXT function, just use Format, Cells, Number tab, Custom
=TODAY() just format this to the custom format YYYY same as above, don't
need the TEXT function although both of these can be used with the text
function.

EDATE is part of the Analysis ToolPak in 2003 and earlier, so you might have
to attach it by choosing Tools, Add-ins, and checking it.
--
Thanks,
Shane Devenshire


"Rachel Costanza" wrote:

I have a an excel workbook with 15 worksheets that I have to update the prior
month and current year on every month to produce a turnover report. Can I
use VB or a DATE function to do this?

I have tried =TEXT(TODAY(),"mmmm") but that only gives me the current month
and not the year. I need the prior month and current year.

Any help is appreciated!

Best,

Rachel Costanza

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hard code month in Excel Rachel Costanza Excel Discussion (Misc queries) 6 November 7th 08 02:04 AM
Not Hard Code If FIRSTROUNDKO via OfficeKB.com Excel Discussion (Misc queries) 3 July 10th 07 04:11 PM
Hard-code source data Melanie Martin Charts and Charting in Excel 5 December 29th 05 02:07 PM
Excel hard code those #'s without deleting the formula or typing# JudiS Excel Discussion (Misc queries) 1 August 1st 05 11:21 PM
Excel formula randomly changes to hard-code number Ned Excel Discussion (Misc queries) 3 February 14th 05 11:31 PM


All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"