Apply formula to column depending on length of column being referenced

Occasional Visitor

Hi All: 

I'm trying to use a formula on a sheet (let's call it sheet 2) that references back to sheet 1 columns. If there is a value in column A on sheet 1, the formula returns that value. If there is not a value in column A on sheet 1, the formula returns the value of column B. 

 

I am looking for a way for the formula to automatically apply for the entire column A or B of sheet 1, even though the columns lengths will change. I am trying to make this a more automated process, so I want to avoid having to always drag down the formula. 

 

Additionally, I don't want to apply the formula to the entire column, as the resulting 0 values will cause problems for other reasons. 

 

I currently have:

=IF(PM_Columns!A2="",PM_Columns!B2,PM_Columns!A2)

Thanks! 

0 Replies