Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I currently have this format for my cells in a list - "In "#,##0"
Day(s)";#,##0" Day(s) ago" I would like to be able to show the text "Today" if the cell value is zero. Also, if possible, I'd like to get rid of the "(s)" ie if the value is more than 1 or less than -1 it should say "Days" and say "Day" if equal to 1 or -1. Also, can someone point me in the direction of a help file/website for advanced formatting like this.. Thanks Tony |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I don't think you'll be able to get rid of the (s) just with formatting, you
don't get enough options, but you can add a condition for zero just by changing to "In "#,##0" Day(s)";#,##0" Day(s) ago";"Today" "bony_tony" wrote: I currently have this format for my cells in a list - "In "#,##0" Day(s)";#,##0" Day(s) ago" I would like to be able to show the text "Today" if the cell value is zero. Also, if possible, I'd like to get rid of the "(s)" ie if the value is more than 1 or less than -1 it should say "Days" and say "Day" if equal to 1 or -1. Also, can someone point me in the direction of a help file/website for advanced formatting like this.. Thanks Tony |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Hi Tony
There is no way with cell formatting to include or exclude the (s) if periods greater than 1 day are involved. You could achieve your result with formulae though. If you used a helper column which calculated the value and hid this column, then you could use the following formula to achieve what you want. In my case I assumed column A had the calculated days. Adjust to suit. =IF(A1=0,"Today", IF(A10,"In "&ROUNDUP(A1,0)&" day"&IF(A11,"s",""), IF(A1<0,ABS(ROUNDUP(A1,0))&" Day"&IF(A1<-1,"s","")&" ago"))) If you are using the values in further calculations, then obviously this would have to refer to the hidden column, not your formatted column. -- Regards Roger Govier "bony_tony" wrote in message ps.com... I currently have this format for my cells in a list - "In "#,##0" Day(s)";#,##0" Day(s) ago" I would like to be able to show the text "Today" if the cell value is zero. Also, if possible, I'd like to get rid of the "(s)" ie if the value is more than 1 or less than -1 it should say "Days" and say "Day" if equal to 1 or -1. Also, can someone point me in the direction of a help file/website for advanced formatting like this.. Thanks Tony |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calculating only non-empty cells... | Excel Worksheet Functions | |||
want format cells alignment not format cells font style | Excel Discussion (Misc queries) | |||
How do I hide zero values but keep currency format in P.O. form? | New Users to Excel | |||
Show cells have been read - linked | Excel Discussion (Misc queries) | |||
How To Use Cells Without Values in a Formula | Excel Worksheet Functions |