We had a strong start to our fiscal year, reporting earnings of $2.55 a share in Q1 versus $11.22 in the prior-year quarter.
Excluding restructuring and one-time items, we generated a record $2.46 per share in earnings in Q1 compared to $0.64 in the prior-year quarter.
During the quarter, we recognized a net after-tax restructuring gain of $5 million or $0.09 a share primarily related to the sale of a shuttered facility owned by our WSP joint venture.
That compares to restructuring and impairment charges of $0.16 a share a year ago.
In addition, the prior-year results included a net benefit of $10.74 per share related to our investment in Nikola Corporation.
Consolidated net sales in the quarter of $1.1 billion were up significantly compared to $703 million in Q1 of last year.
Gross profit for the quarter increased to $219 million from $113 million a year ago and our gross margin increased to 19.7% from 16.1%.
Adjusted EBITDA in Q1 was a record $196 million, up from $75 million in Q1 of last year and our trailing 12-month adjusted EBITDA is now $604 million.
In Steel Processing net sales of $823 million nearly doubled from $431 million in Q1 of last year due to higher average selling prices and increased volumes.
Total shipped tons were up 14% from last year's first quarter when demand was just beginning to recover from COVID-related shutdowns, particularly at our automotive customers.
Direct tons in Q1 were 49% of mix, which was consistent with the prior-year quarter.
In the current quarter, steel generated adjusted EBIT of $108 million and adjusted EBIT margin of 13% compared to $14 million and 3% in Q1 of last year.
In the quarter, we had pre-tax inventory holding gains estimated to be $47 million or $0.68 per share compared to holding losses of $7 million or $0.09 a share in Q1 of last year.
In Consumer Products, net sales in Q1 were $148 million, up 10.6% from the prior-year quarter.
EBIT for the consumer business was $21 million and EBIT margin was 14%, down from $24 million and 18% in the prior-year quarter.
Building Products generated net sales of $115 million in Q1, which was up 30% from $88 million in the prior-year quarter.
Building Products EBIT was $49 million and EBIT margin was 42%, up significantly from $23.4 million and 27% in Q1 of last year.
We saw significant growth year-over-year in our wholly owned Building Products businesses but the majority of the upside was driven by strong results at WAVE and ClarkDietrich that contributed $26 million and $17 million respectively in equity earnings.
In Sustainable Energy Solutions net sales in Q1 were $25 million, down from $28 million in the prior-year quarter.
The business reported a negative EBIT of $3 million in the current period as volumes were too low to absorb fixed costs.
With respect to cash flows in our balance sheet, operations used cash of $50 million in the quarter, which was driven by $149 million increase in working capital, primarily associated with higher steel prices along with annual accrued compensation being paid out during the quarter.
During the quarter, we received $20 million in dividends from our unconsolidated JVs, received $27 million in proceeds from asset sales, completed one acquisition for $105 million, invested $24 million in capital projects, paid $15 million in dividends and spent $61 million to repurchase 1 million shares of our common stock.
Following the Q1 purchases, we have 8.3 million shares remaining under our share repurchase authorization.
Funded debt at quarter end of $706 million was relatively flat sequentially and interest expense of $8 million was in line with the prior-year quarter.
Ended Q1 with $399 million in cash and we continue to take a balanced approach to capital allocation focused on growth and on returning capital to shareholders.
Earlier today, the Board declared a $0.28 per share dividend for the quarter, which is payable in December 2021.
In fiscal '21, 64% of our facilities achieved a four or five star performance rating.

Summary:
We had a strong start to our fiscal year, reporting earnings of $2.55 a share in Q1 versus $11.22 in the prior-year quarter.
Excluding restructuring and one-time items, we generated a record $2.46 per share in earnings in Q1 compared to $0.64 in the prior-year quarter.
Consolidated net sales in the quarter of $1.1 billion were up significantly compared to $703 million in Q1 of last year.