I have 2 sheets, one (numerically named for the day of the month, in this example '1') has daily records on vehicle mileage, where column A is the vehicle registration number (VRM), column C the daily mileage.
Sheet 2 (Total) is a running total for the month of mileage for each vehicle.

My formula, placed in the Total sheet, is =IF(COUNTIF('1'!$A:$A,""),"",IF(COUNTIF('1'!$A:$A,Total!$A2),VLOOKUP(Total!$A2,'1'!$A:$C,3,FALSE),"0 "))

What I am trying to do is the following:

If the daily VRM list ('1'$A$A) is empty, then leave the cell null
ELSE
If the VRM that corresponds to my cell in the Total sheet (Total!$A2) is present in the daily VRM list then perform a VLOOKUP on column C of the daily sheet
ELSE
Enter a '0' value in the cell.

Except it's not working. Can anyone see from looking at the formula what is wrong? Or do you need to see examples?