Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Column D = Date closed (1/1/2009 format)
Column AF = Day Closed (custom "d" format) Column AG = Week Closed (General Format) Column AF gets the day closed using the formula: =D2 Column AG gets the Week Closed using the formula: =IF(OR($AF2=1,$AF2=2,$AF2=3,$AF2=4,$AF2=5,$AF2=6,$ AF2=7),"Week One,"")) The formula works in Column AF, but I can't the formula to work in Column AG. It leaves the cells blank. I thought maybe the formula in AF is interfering with the formula in AG. So I took the fomula out of AF and put the same value in the cell. Presto. The formula in AG worked. Is there a solution to this? Why can't the formula read the value from the cell unless I make it a "Number" format? Maybe I am doing everything wrong. Any help would be appreciated. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Excel stores dates as serial numbers. 1/1/2009 would be 39814 (the number of
days since January 1, 1900). When you apply a cell format (such as date) it only affects what is displayed on the screen. It does not change the underlying value in the cell. Formulas always use the underlying value of a cell, and pay no attention to the displayed format. Thus, your formula (IF(OR($AF2=1...etc) would not work because AF2 contains a serial number, not the number 1 which is displayed. Assuming that you define "Week 1" as being the first 7 days of a month, try this formula in AF: ="Week"&CEILING(DAY(D2)/7,1) Or, if you want 1,2,3... spelled out as "one","two","three" you could use: ="Week"&LOOKUP(CEILING(DAY(D2)/7,1),{1,2,3,4,5},{"One","Two","Three","Four","Five "}) HTH Elkar "Charles Stover" wrote: Column D = Date closed (1/1/2009 format) Column AF = Day Closed (custom "d" format) Column AG = Week Closed (General Format) Column AF gets the day closed using the formula: =D2 Column AG gets the Week Closed using the formula: =IF(OR($AF2=1,$AF2=2,$AF2=3,$AF2=4,$AF2=5,$AF2=6,$ AF2=7),"Week One,"")) The formula works in Column AF, but I can't the formula to work in Column AG. It leaves the cells blank. I thought maybe the formula in AF is interfering with the formula in AG. So I took the fomula out of AF and put the same value in the cell. Presto. The formula in AG worked. Is there a solution to this? Why can't the formula read the value from the cell unless I make it a "Number" format? Maybe I am doing everything wrong. Any help would be appreciated. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I tried the ="Week"&CEILING(DAY(D2)/7,1)
It worked, but how do I get it to do "Week 1" or "Week 2", etc. through 31 days? "Elkar" wrote: Excel stores dates as serial numbers. 1/1/2009 would be 39814 (the number of days since January 1, 1900). When you apply a cell format (such as date) it only affects what is displayed on the screen. It does not change the underlying value in the cell. Formulas always use the underlying value of a cell, and pay no attention to the displayed format. Thus, your formula (IF(OR($AF2=1...etc) would not work because AF2 contains a serial number, not the number 1 which is displayed. Assuming that you define "Week 1" as being the first 7 days of a month, try this formula in AF: ="Week"&CEILING(DAY(D2)/7,1) Or, if you want 1,2,3... spelled out as "one","two","three" you could use: ="Week"&LOOKUP(CEILING(DAY(D2)/7,1),{1,2,3,4,5},{"One","Two","Three","Four","Five "}) HTH Elkar "Charles Stover" wrote: Column D = Date closed (1/1/2009 format) Column AF = Day Closed (custom "d" format) Column AG = Week Closed (General Format) Column AF gets the day closed using the formula: =D2 Column AG gets the Week Closed using the formula: =IF(OR($AF2=1,$AF2=2,$AF2=3,$AF2=4,$AF2=5,$AF2=6,$ AF2=7),"Week One,"")) The formula works in Column AF, but I can't the formula to work in Column AG. It leaves the cells blank. I thought maybe the formula in AF is interfering with the formula in AG. So I took the fomula out of AF and put the same value in the cell. Presto. The formula in AG worked. Is there a solution to this? Why can't the formula read the value from the cell unless I make it a "Number" format? Maybe I am doing everything wrong. Any help would be appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Formula to read formula in a cell | Excel Discussion (Misc queries) | |||
How to read the value of a cell | Excel Worksheet Functions | |||
Formula to read just the first 2 to 3 characters in a cell. | Excel Discussion (Misc queries) | |||
CAN YOU SET GRAPH TO READ, FORMULA IN A CELL AS A BLANK CELL | Excel Discussion (Misc queries) | |||
can formula to read sheetname from a cell? | Excel Worksheet Functions |