Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 32
Default Cell formula translation

I have a cell C1 with a formula =Now() This gives me 2010
I have another cell C2 with a formula =Now()-100 This gives m1 2009

So far so good

I need to to create a cell value as follows 12/22/LY - 1/21/CY
Where LY would refer back to cell C2 and CY would refer back to cell C1.
This cell would then become 12/22/2009 - 1/21/2010. I cannot use Excel
macros. I would be wrapping this in an if statement so that the next cell
would be 1/22/CY - 2/21/CY

Any help would be appreciated. Thanks
--
Shell
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Cell formula translation

Shell wrote:
I have a cell C1 with a formula =Now() This gives me 2010
I have another cell C2 with a formula =Now()-100 This gives m1 2009

So far so good

I need to to create a cell value as follows 12/22/LY - 1/21/CY
Where LY would refer back to cell C2 and CY would refer back to cell C1.
This cell would then become 12/22/2009 - 1/21/2010. I cannot use Excel
macros. I would be wrapping this in an if statement so that the next cell
would be 1/22/CY - 2/21/CY

Any help would be appreciated. Thanks


=NOW() does not give you 2010. It gives you the current date/time, which you
may have formatted to show just the year. If you want the current year, use this:

=YEAR(TODAY())

And last year would be this:

=YEAR(TODAY())-1


As to your desired results, there may be numerous ways to accomplish it. Not
sure why you are "wrapping this in an if statement". Maybe try something like this:

=TEXT(DATE(YEAR(TODAY()),ROW(1:1)-1,22),"M/D/YYYY")&" - "&
TEXT(DATE(YEAR(TODAY()),ROW(1:1),21),"M/D/YYYY")
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 793
Default Cell formula translation

Are you looking for
="12/22/"&TEXT(C2,"yyyy")& " - 1/21/" & TEXT(C1,"yyyy")

this will give you the string 12/22/2009 - 1/21/2010

"Shell" wrote:

I have a cell C1 with a formula =Now() This gives me 2010
I have another cell C2 with a formula =Now()-100 This gives m1 2009

So far so good

I need to to create a cell value as follows 12/22/LY - 1/21/CY
Where LY would refer back to cell C2 and CY would refer back to cell C1.
This cell would then become 12/22/2009 - 1/21/2010. I cannot use Excel
macros. I would be wrapping this in an if statement so that the next cell
would be 1/22/CY - 2/21/CY

Any help would be appreciated. Thanks
--
Shell

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
Translation Problem inw beer Excel Discussion (Misc queries) 1 November 4th 09 03:56 PM
OR formula, translation to swedish please FreddieP Excel Discussion (Misc queries) 5 September 29th 06 07:57 AM
Translation/formula. ivan Excel Discussion (Misc queries) 6 September 25th 06 08:34 PM
& function cell format translation. [email protected] Excel Discussion (Misc queries) 3 April 7th 06 12:18 PM
Need help with formula translation please Michael Saffer Excel Worksheet Functions 1 February 10th 05 11:30 AM


All times are GMT +1. The time now is 07:23 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"