Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default How do I get a formula in a cell to read from another cell

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 964
Default How do I get a formula in a cell to read from another cell

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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default How do I get a formula in a cell to read from another cell

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
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
Formula to read formula in a cell [email protected] Excel Discussion (Misc queries) 5 August 20th 08 03:17 AM
How to read the value of a cell Hell-fire[_3_] Excel Worksheet Functions 17 September 5th 07 09:10 AM
Formula to read just the first 2 to 3 characters in a cell. Clemson Gene Excel Discussion (Misc queries) 2 January 11th 07 12:22 AM
CAN YOU SET GRAPH TO READ, FORMULA IN A CELL AS A BLANK CELL AJ-foster Excel Discussion (Misc queries) 2 July 15th 06 08:34 AM
can formula to read sheetname from a cell? Todd Excel Worksheet Functions 2 December 8th 04 06:21 PM


All times are GMT +1. The time now is 12:45 PM.

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

About Us

"It's about Microsoft Excel"