If-then formulas for Custom Columns

Hello, I'm pricing a job that has both LF measurements for wall base and Wall Area measurements for wall panels. I currently have a formula calculating Raw Material Cost (custom column) which is: Measurement * Material. I have multiple other columns building off this value to add various other data. (Mark-up on material, Fabrication Hrs, Installation Hrs, Total cost & Total sell for)

Q: Is there a way to have the formula calculating: Measurement * Material look first at the "Wall Area" column and if it the value is 0 then look at the "Measurement" column? [Open to other solutions]

Thank you.