use a function to copy a range of cells

Copper Contributor

I have a range of entries say a1:a5 that contains A, B, C, D, E, respectively.  I want to write a functions that essentially says, in cell c1 If a1 is not empty then copy a1:a5 to else " ".  Any suggestions?

1 Reply

@unclepauly28 

Depends on Excel version, as variant

=IF(A1<>"", A1:A5,"")