(if any) of such State for the preceding calendar year, . (2) Unused middle-income State housing credit The second sentence of section 42(h)(3)(C) of such Code is amended by inserting , and the unused middle-income State housing credit for any calendar year is the excess (if any) of the amount described in section 42A(h)(3)(C) (after application of section 42A(h)(7)) for such State over the aggregate amount of middle-income housing credit dollar amount allocated by such State under section 42A for such year after for such year . (3) Unused middle income State housing credit included in carryover allocation Section 42(h)(3)(D)(ii) of such Code is amended— (A) by inserting the sum of after is the excess (if any) of