#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Logic in Tables

I have a table of product data that is returned from a linked Access query.
One of the columns contains a date. I create a calculated column headed
1-Jan-2005, and then 1-Feb-2005, etc all the way to now
I then try to create a simple IF statement that would compare the column
header with the date column in the table and return a Over or Not
dependending on whether the data in tha table is greater that the column
header.

=IF(Table_CBCC_Data[[#This
Row],[dateBudget]]Table_CBCC_Data[[#Headers],[01-Jan-05]],"Over","Not")

Now the formula is carried down to all the rows in the table but the
calculated result is always the value in the first cell irrespective of
whether the test is true or not in the rest of the cells. What am I missing
here? Is there a special way of generating calculated formulae in this
fashion?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 80
Default Logic in Tables

Do you understand relative vs absolute references? In your formula,
the entry for the Access date cell must remain absolute across the
row. The entry for the column name (i.e. 1-jan-05) must be absolute
copying down each column.

If you are creating a formula in the first cell, then simply copying
to other cells, your answers will be off unless you set the proper
relative and absolute references. Just hit F2 in any cell to see what
cells that formula is pointing to and you will see what I mean.
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22
Default Logic in Tables

I understand the references. That was not my question. The fact is that the
formula returns the negative irrespective of whether the answer was true or
not. After a bit more research it turns out the column headers - even though
they were entered as dates are treated as text so the comparison is always
going to return the same result.
Thanks for your help.


"HKaplan" wrote:

Do you understand relative vs absolute references? In your formula,
the entry for the Access date cell must remain absolute across the
row. The entry for the column name (i.e. 1-jan-05) must be absolute
copying down each column.

If you are creating a formula in the first cell, then simply copying
to other cells, your answers will be off unless you set the proper
relative and absolute references. Just hit F2 in any cell to see what
cells that formula is pointing to and you will see what I mean.

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
I Then logic help robnet Excel Worksheet Functions 4 July 13th 07 10:08 PM
Logic please changetires Excel Discussion (Misc queries) 2 June 20th 06 06:21 PM
If Then logic not enough workerbeeVAB Excel Discussion (Misc queries) 4 January 5th 06 05:24 PM
IRR Logic Carrie Excel Worksheet Functions 2 November 18th 05 08:59 PM
IF THEN LOGIC flotowntiger Excel Discussion (Misc queries) 5 December 7th 04 12:12 AM


All times are GMT +1. The time now is 04:23 PM.

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"