The Secretary shall allocate grant funds under this section for use in each State on the basis of a formula contained in a regulation prescribed by the Secretary using the average of the ratios between—
(A) the population of the rural areas in that State and the population of the rural areas of all States;
(B) the extent of poverty in the rural areas in that State and the extent of poverty in the rural areas of all States; and
(C) the extent of substandard housing in the rural areas of that State and the extent of substandard housing in the rural areas of all States.
Any funds which are allocated to a State but uncommitted to grantees will be transferred to the State office of the Farmers Home Administration in a timely manner and be used for authorized rehabilitation activities under section 1474 of this title . Funds obligated, but subsequently unspent and deobligated, may remain available, to the extent provided in appropriations Acts, for use as housing preservation grants in ensuing fiscal years.