View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Miguel Zapico
 
Posts: n/a
Default Conditional formatting based on date range

Could you post some example with numbers? The sintaxis of the formula is not
wrong at first sight, so what do you mean by "doesn't work"?
What puzzles me is why you are using both F1 and G1 in the comprobations,
maybe with data it will be more clear (if that is the month comprobation,
maybe changing G$1=data!K2 for MONTH(F$1)=MONTH(data!$K2) can help)

Miguel.

"RGB" wrote:

Hi,

I am trying to create a formula which will;

Firstly check if a date is in a range:

* If not, then zero should be returned

*If yes - the formula should check again to see if the date matches a
specific date (only needs to match the month - not the exact day!)

(If the date does match- Then formula should then return a value from
another table.

If it doesn't match the exact date, (but is still part of the original
range) then a different $ value should be calculated based. This is based on
a total $ value divided by a number of specified months.

I need to work this out for many years information!

So far I have;

=IF(AND(F$1=data!$K2, F$1<=data!$H2),
(IF(G$1=data!K2),D2,(data!$I2/$C2),(""))

Which doesnt work - Anybody got any ideas?

Many Thanks