Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,670
Default How to specific the cell format?

Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default How to specific the cell format?

See one answer to your identical post in microsoft.public.excel.misc.

In article ,
Eric wrote:

Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default How to specific the cell format?

=IF(A1="","",IF(A1="Daily",TEXT(TODAY(),"dd-mmm"),TEXT(TODAY(),"mmm-yy")))

"Eric" wrote:

Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default How to specific the cell format?

How about this?

=TEXT(TODAY(), IF(A1="Daily", "dd-mmm", IF(A1="Monthly", "mmm-yy",
"")))

OR

=TEXT(TODAY(), IF(TRIM(A1)="Daily", "dd-mmm", IF(TRIM(A1)="Monthly", "mmm-yy",
""))) which takes care of leading spaces.

If you accidentally key in a space and Daily in A1, the first formula will not return day and month but the second formula will.

Experts, please feel free to correct me.

Epinn

"Eric" wrote in message ...
Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default How to specific the cell format?

Not sure how you want to use the formula; part of a heading for a report template?

Anyway, word of caution:

Since TODAY() is a volatile function and it gets changed every time when the worksheet is accessed, you may want to lock in the result of the formula by doing editpaste specialvalue.

Comments welcome.

Epinn

"Epinn" wrote in message ...
How about this?

=TEXT(TODAY(), IF(A1="Daily", "dd-mmm", IF(A1="Monthly", "mmm-yy",
"")))

OR

=TEXT(TODAY(), IF(TRIM(A1)="Daily", "dd-mmm", IF(TRIM(A1)="Monthly", "mmm-yy",
""))) which takes care of leading spaces.

If you accidentally key in a space and Daily in A1, the first formula will not return day and month but the second formula will.

Experts, please feel free to correct me.

Epinn

"Eric" wrote in message ...
Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default How to specific the cell format?

Actually, there is an easier way than paste specialvalue.

I just learned that I can enter the formula with Ctrl+; (semicolon) to lock in the date.

Epinn

"Epinn" wrote in message ...
Not sure how you want to use the formula; part of a heading for a report template?

Anyway, word of caution:

Since TODAY() is a volatile function and it gets changed every time when the worksheet is accessed, you may want to lock in the result of the formula by doing editpaste specialvalue.

Comments welcome.

Epinn

"Epinn" wrote in message ...
How about this?

=TEXT(TODAY(), IF(A1="Daily", "dd-mmm", IF(A1="Monthly", "mmm-yy",
"")))

OR

=TEXT(TODAY(), IF(TRIM(A1)="Daily", "dd-mmm", IF(TRIM(A1)="Monthly", "mmm-yy",
""))) which takes care of leading spaces.

If you accidentally key in a space and Daily in A1, the first formula will not return day and month but the second formula will.

Experts, please feel free to correct me.

Epinn

"Eric" wrote in message ...
Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric



  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 605
Default How to specific the cell format?

I just learned that I can enter the formula with Ctrl+; (semicolon) to lock in the date. <<

I better clarify that the formula is =TODAY() and *not* the ones posted earlier.

Sorry for the confusion.

Epinn

"Epinn" wrote in message ...
Actually, there is an easier way than paste specialvalue.

I just learned that I can enter the formula with Ctrl+; (semicolon) to lock in the date.

Epinn

"Epinn" wrote in message ...
Not sure how you want to use the formula; part of a heading for a report template?

Anyway, word of caution:

Since TODAY() is a volatile function and it gets changed every time when the worksheet is accessed, you may want to lock in the result of the formula by doing editpaste specialvalue.

Comments welcome.

Epinn

"Epinn" wrote in message ...
How about this?

=TEXT(TODAY(), IF(A1="Daily", "dd-mmm", IF(A1="Monthly", "mmm-yy",
"")))

OR

=TEXT(TODAY(), IF(TRIM(A1)="Daily", "dd-mmm", IF(TRIM(A1)="Monthly", "mmm-yy",
""))) which takes care of leading spaces.

If you accidentally key in a space and Daily in A1, the first formula will not return day and month but the second formula will.

Experts, please feel free to correct me.

Epinn

"Eric" wrote in message ...
Refering to the post in general question
Does anyone know how to do it in excel?
In cell A1, if text within this cell is "Daily", then the cell B1 will show
the date in this format "18-Jan". If cell A1, if text within this cell is
"Monthly", then teh cell B1 will show the date in this format "Jan-07"
Does anyone have any suggestion?

Thank you for any suggestion
Eric




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
How to specific the cell format? Eric Excel Discussion (Misc queries) 3 January 18th 07 10:59 AM
Urgent date/scheduling calc needed jct Excel Worksheet Functions 3 February 24th 06 01:36 AM
Format of a cell profG Excel Discussion (Misc queries) 1 January 16th 06 03:02 PM
Format cell to accept only specific character-reject others aetzkin Excel Discussion (Misc queries) 2 December 27th 05 05:03 PM
can't format cell - have tried unlocking and unprotecting griffin Excel Discussion (Misc queries) 1 April 5th 05 02:11 AM


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