View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Graham Graham is offline
external usenet poster
 
Posts: 155
Default Circular Reference Problem

Hi

I'm having trouble with a circular reference.

The aim is to convert a 2 digit number, from the cell to the left, to a
nominal date and return an approximate age.

The following code should apply the formula and copy down to the last row


Range("S2").Select
ActiveCell.FormulaR1C1 =
"=ROUNDDOWN((TODAY()-(IF(R2<10,CONCATENATE(""01/01/"",""200"",R2),CONCATENATE(""01/01/"",""19"",R2))*1))/365,0)"
Selection.AutoFill Destination:=Range("S2:S" & Cells(Rows.Count,
"A").End(xlUp).Row), Type:=xlFillDefault


Once the macro has run the formula is displayed in the cells as

=ROUNDDOWN((TODAY()-(IF($2:$2<10,CONCATENATE("01/01/","200",$2:$2),CONCATENATE("01/01/","19",$2:$2))*1))/365,0)


Any help would be appreciated